Serhiy Storchaka added the comment:
> +.. 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
----------
nosy: +storchaka
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14783>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com