Message170709
| 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 |
|