Liam Clarke wrote:
oh? Is is the negative?

No, the decimal fraction. It's easy enough to try it:

Not exactly, it's a combination of string *and* decimal fraction.
int('-945')
-945
int('-945.0')
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
ValueError: invalid literal for int(): -945.0
int(-945.0)
-945


Jacob

 >>> int('950')
950
 >>> int('-950')
-950
 >>> int('950.00')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: invalid literal for int(): 950.00
 >>> int('-950.00')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: invalid literal for int(): -950.00

Kent


_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Reply via email to