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

2008-01-19 Thread Facundo Batista
Facundo Batista added the comment: Only left the version 3.0, as the OP said it's not so important as to break possible previous working code. -- nosy: +facundobatista versions: -Python 2.4, Python 2.5, Python 2.6 __ Tracker [EMAIL PROTECTED]

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

2008-01-19 Thread Juan José Conti
Juan José Conti added the comment: This is my first patch. Bug fix on revision 60076. -- nosy: +jjconti Added file: http://bugs.python.org/file9220/bug_fix_for_1779.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779

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

2008-01-19 Thread Juan José Conti
Juan José Conti added the comment: The same patch as before plus tests. Added file: http://bugs.python.org/file9228/bug_fix_for_1779-plustests.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779 __

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

2008-01-19 Thread Facundo Batista
Facundo Batista added the comment: Fixed in r60090. Thanks Juanjo for your contribution! Please sign and send in a contributor form whenever you have time; the forms are at http://www.python.org/psf/contrib/ . -- resolution: - fixed status: open - closed

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

2008-01-12 Thread Mark Dickinson
Mark Dickinson added the comment: For Python 3.0, this is a trivial fix: two lines need to be removed from PyLong_FromString in longobject.c, and then the tests in test_builtin need to be fixed up. (For Python 2.6, the fix would be a bit more involved: PyOS_strtol would also need fixing.)

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

2008-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: Moreover I think float is right and int is wrong. Something to fix in 3.0, probably not in 2.6 (don't want to break too much stuff that worked in 2.5). __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779

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

2008-01-09 Thread Guido van Rossum
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: