Mark Dickinson added the comment:
About Rational('3.') and Rational('.2'):
It's not so much to do with consistency with float and Decimal; more to do
with the fact that some people like to write floats these ways (which
presumably is why float and Decimal allow such input).
It occurs to me that if you also allow things like Rational('1e+100') then
conversions from Decimal to Rational could simply be spelled
Rational(str(decimal_instance))
eliminating the need for the special Decimal -> Rational conversion method.
Anyway, I'll change the regex to allow '3.' and '.3'.
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1682>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com