[issue4221] inconsistent exception from int is confusing

2012-07-21 Thread Florent Xicluna
Florent Xicluna added the comment: Proposed as won't fix for the 2.x series. -- resolution: -> wont fix stage: -> committed/rejected status: open -> closed ___ Python tracker _

[issue4221] inconsistent exception from int is confusing

2011-10-28 Thread Florent Xicluna
Florent Xicluna added the comment: No more bug with Python 3.2. On 2.7, we still experience the behavior described in msg75290. -- versions: -Python 2.6, Python 3.1, Python 3.2 ___ Python tracker

[issue4221] inconsistent exception from int is confusing

2010-08-12 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue4221] inconsistent exception from int is confusing

2010-01-21 Thread STINNER Victor
STINNER Victor added the comment: See also issue #7710. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue4221] inconsistent exception from int is confusing

2010-01-15 Thread Florent Xicluna
Florent Xicluna added the comment: Python 3 gives same confusing error: >>> int(b'\0', 999) Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for int() with base 999: b'\x00' >>> int(b'x', 999) Traceback (most recent call last): File "", line 1, in ValueE

[issue4221] inconsistent exception from int is confusing

2010-01-15 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker ___ ___ Python

[issue4221] inconsistent exception from int is confusing

2008-11-01 Thread Jean-Paul Calderone
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment: 2.6 exhibits the same behavior as 2.5 in this case. 3.0 exhibits similar behavior, but with a slightly different exception in the NUL case. The examples included showing the Python 3 behavior don't cover the same cases as the examples I

[issue4221] inconsistent exception from int is confusing

2008-11-01 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: You tested on 2.5.2 but marked this for 2.6. 3.0 gives >>> int('\0') Traceback (most recent call last): File "", line 1, in int('\0') UnicodeEncodeError: 'decimal' codec can't encode character '\x00' in position 0: invalid decimal Unic

[issue4221] inconsistent exception from int is confusing

2008-10-28 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Since it is not defined which bytes are used as digits for bases > 36, \x00 is not a "valid byte". In any case, the problem here is that the base check is done after the "no NULL" check. Perhaps the error should explicitly mention that no null

[issue4221] inconsistent exception from int is confusing

2008-10-28 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>: [EMAIL PROTECTED]:~$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> int('\0', 256) Traceback (most recent