simple perl program in python gives errors

John Zenger john_zenger at yahoo.com
Mon Jan 30 12:33:31 EST 2006


squash at peoriadesignweb.com wrote:
> Also I noticed if I initialize a variable
> as 0 , then I can only do integer math not floating math. this just
> seems kind of backward as I am used to php and perl which dont require
> such strict rules.
> 

Not quite:

 >>> foo = 0
 >>> foo += 122
 >>> print foo
122
 >>> print foo / 7
17
 >>> print foo / 7.0
17.4285714286



More information about the Python-list mailing list