Message171299
Good thought. Here is one data point:
$ pypy
Python 2.7.2 (341e1e3821fff77db3bb5cdb7a4851626298c44e, Jun 09 2012, 14:24:11)
[PyPy 1.9.0] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>> int()
0
>>>> int(x='10', base=8)
8
>>>> int(x=5, base=10)
Traceback (most recent call last):
File "<console>", line 1, in <module>
TypeError: int() can't convert non-string with explicit base
>>>> int(base=6)
Traceback (most recent call last):
File "<console>", line 1, in <module>
TypeError: int() can't convert non-string with explicit base
>>>> int(base='foo')
Traceback (most recent call last):
File "<console>", line 1, in <module>
TypeError: expected integer, got str object
So it looks like "no x with given base" is where behavior differs. |
|
Date |
User |
Action |
Args |
2012-09-25 17:01:51 | chris.jerdonek | set | recipients:
+ chris.jerdonek, pitrou, ezio.melotti |
2012-09-25 17:01:51 | chris.jerdonek | set | messageid: <1348592511.1.0.408086872965.issue16045@psf.upfronthosting.co.za> |
2012-09-25 17:01:30 | chris.jerdonek | link | issue16045 messages |
2012-09-25 17:01:29 | chris.jerdonek | create | |
|