[issue1779] int("- 1") is valud, but float("- 1") isn't. Which is right?

Guido van Rossum report at bugs.python.org
Thu Jan 10 02:00:03 CET 2008


New submission from Guido van Rossum:

I discovered that when converting a string to an int or float, the int
conversion allows whitespace after the sign, while the float conversion
doesn't. I think they should be consistent.

----------
components: Interpreter Core
messages: 59641
nosy: gvanrossum
priority: low
severity: normal
status: open
title: int("- 1") is valud, but float("- 1") isn't. Which is right?
versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1779>
__________________________________


More information about the Python-bugs-list mailing list