This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients cvrebert, docs@python, eric.araujo, ezio.melotti, georg.brandl, rhettinger, serhiy.storchaka, terry.reedy, tshepang
Date 2012-09-19.07:47:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348040846.54.0.657732126674.issue14783@psf.upfronthosting.co.za>
In-reply-to
Content
> +.. function:: int(number=0)

First argument is named "x".

>>> int(number=42)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'number' is an invalid keyword argument for this function
>>> int(x=42)
42

+              int(string, base=10)

Here can be not only string, but bytes or bytearray.

>>> int('42', 6)
26
>>> int(b'42', 6)
26
>>> int(bytearray(b'42'), 6)
26
History
Date User Action Args
2012-09-19 07:47:26serhiy.storchakasetrecipients: + serhiy.storchaka, georg.brandl, rhettinger, terry.reedy, ezio.melotti, eric.araujo, cvrebert, docs@python, tshepang
2012-09-19 07:47:26serhiy.storchakasetmessageid: <1348040846.54.0.657732126674.issue14783@psf.upfronthosting.co.za>
2012-09-19 07:47:26serhiy.storchakalinkissue14783 messages
2012-09-19 07:47:25serhiy.storchakacreate