[Python-ideas] Fix some special cases in Fractions?

Neil Girdhar mistersheik at gmail.com
Thu Aug 30 00:39:05 EDT 2018


Would there be any problem with changing:

In [4]: Fraction(1, 1) ** Fraction(2, 3)
Out[4]: 1.0

In [5]: Fraction(-1, 1) ** Fraction(2, 3)
Out[5]: (-0.4999999999999998+0.8660254037844387j)

In [6]: Fraction(0, 1) ** Fraction(2, 3)
Out[6]: 0.0

I'd like these to be Fraction(1), Fraction(1), and Fraction(0).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180829/b78b430a/attachment.html>


More information about the Python-ideas mailing list