From: SourceForge.net <no...@so...> - 2007-04-13 06:48:52
|
Patches item #1682498, was opened at 2007-03-16 19:32 Message generated for change (Settings changed) made by cgroves You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1682498&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None >Group: targeted for 2.2beta2 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Philip Jenvey (pjenvey) Assigned to: Nobody/Anonymous (nobody) Summary: Fix int(None) raising an AttributeError Initial Comment: 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 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1682498&group_id=12867 |