[issue7710] Inconsistent Exception for int() conversion

2012-07-21 Thread Florent Xicluna
Florent Xicluna added the comment: The behavior seems acceptable in 2.7 too. >>> int('\0') Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for int() with base 10: '' >>> int('\01') Traceback (most recent call last): File "", line 1, in ValueError: invali

[issue7710] Inconsistent Exception for int() conversion

2011-10-28 Thread Florent Xicluna
Florent Xicluna added the comment: On 3.2 it is fixed (I didn't find the related changeset). Not backported to 2.7. -- versions: -Python 3.1, Python 3.2 ___ Python tracker ___

[issue7710] Inconsistent Exception for int() conversion

2010-08-12 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +belopolsky stage: -> unit test needed type: -> behavior versions: +Python 2.7, Python 3.1 ___ Python tracker ___ _

[issue7710] Inconsistent Exception for int() conversion

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

[issue7710] Inconsistent Exception for int() conversion

2010-01-20 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue7710] Inconsistent Exception for int() conversion

2010-01-15 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Loosely related to issue4221. -- nosy: +exarkun ___ Python tracker ___ ___ Python-bugs-list mai

[issue7710] Inconsistent Exception for int() conversion

2010-01-15 Thread Florent Xicluna
Florent Xicluna added the comment: The null byte gives UnicodeEncodeError for other conversions too. Python 3: int('\0'), float('\0'), complex('\0') Python 2: int(u'\0'), long(u'\0'), float(u'\0'), complex(u'0') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError:

[issue7710] Inconsistent Exception for int() conversion

2010-01-15 Thread Florent Xicluna
New submission from Florent Xicluna : On Python 3: >>> int('\0') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'decimal' codec can't encode character '\x00' in position 0: invalid decimal Unicode string >>> int('\01') Traceback (most recent call last): File ""