
report at bugs
Jul 4, 2008, 12:57 PM
Post #1 of 3
(68 views)
Permalink
|
|
[issue3287] Fraction constructor should raise TypeError instead of AttributeError
|
|
New submission from Raymond Hettinger <rhettinger[at]users.sourceforge.net>: >>> from fractions import * >>> Fraction(3.1) Traceback (most recent call last): File "<pyshell#14>", line 1, in <module> Fraction(3.1) File "C:\Python26\lib\fractions.py", line 100, in __new__ numerator = numerator.__index__() AttributeError: 'float' object has no attribute '__index__' ---------- assignee: jyasskin components: Library (Lib) messages: 69267 nosy: jyasskin, rhettinger severity: normal status: open title: Fraction constructor should raise TypeError instead of AttributeError type: behavior versions: Python 2.6, Python 3.0 _______________________________________ Python tracker <report[at]bugs.python.org> <http://bugs.python.org/issue3287> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|