New submission from Raymond Hettinger <[EMAIL PROTECTED]>:
>>> 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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3287>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com