[issue4221] inconsistent exception from int is confusing

Florent Xicluna report at bugs.python.org
Fri Jan 15 21:50:10 CET 2010


Florent Xicluna <laxyf at yahoo.fr> added the comment:

Python 3 gives same confusing error:

>>> int(b'\0', 999)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 999: b'\x00'

>>> int(b'x', 999)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: int() arg 2 must be >= 2 and <= 36

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4221>
_______________________________________


More information about the Python-bugs-list mailing list