Message2688
int() on None or any object that doesn't implement __int__ currently raises an AttributeError, when it should raise a TypeError:
Jython 2.3a0 on java1.5.0_07
Type "copyright", "credits" or "license" for more information.
>>> int(None)
Traceback (innermost last):
File "<console>", line 1, in ?
AttributeError: __int__
Python 2.4.3 (#1, Mar 2 2007, 22:22:33)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> int(None)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: int() argument must be a string or a number
The following patch fixes this and ensures so with 2 new tests added to test_descr.py |
|
| Date |
User |
Action |
Args |
| 2008-02-20 17:18:41 | admin | link | issue1682498 messages |
| 2008-02-20 17:18:41 | admin | create | |
|