[New-bugs-announce] [issue16055] incorrect error text for int(base=1000, x='1')

Chris Jerdonek report at bugs.python.org
Wed Sep 26 21:41:01 CEST 2012


New submission from Chris Jerdonek:

The following error text is incorrect in at least one way:

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

The *base* argument can also be 0.  Secondly, the text should probably say "base arg" instead of "arg 2" since 1000 is not in position 2.

The 2.7 code does not have the second issue:

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

----------
components: Library (Lib)
keywords: easy
messages: 171357
nosy: chris.jerdonek, ezio.melotti
priority: normal
severity: normal
stage: test needed
status: open
title: incorrect error text for int(base=1000, x='1')
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

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


More information about the New-bugs-announce mailing list