Python mistaking float for string

Posted by wrongusername on Stack Overflow See other posts from Stack Overflow or by wrongusername
Published on 2010-03-21T01:45:57Z Indexed on 2010/03/21 1:51 UTC
Read the original article Hit count: 398

Filed under:
|
|
|
|

I receive

TypeError: Can't convert 'float' object to str implicitly

while using

Gambler.pot += round(self.bet + self.money * 0.1)

where pot, bet, and money are all doubles (or at least are supposed to be). I'm not sure if this is yet another Eclipse thing, but how do I get the line to compile?

Code where bet and money are initialized:

money = 0
bet = 0

© Stack Overflow or respective owner

Related posts about python

Related posts about implicit