[issue27832] fractions.Fraction with 3 arguments: error passes silently
Vedran Čačić
report at bugs.python.org
Tue Aug 23 05:07:53 EDT 2016
Vedran Čačić added the comment:
Yes, although it can be viewed as a bugfix, it's impossible on Python 2. We _can_ do it on Python 2 too, with
def __new__(cls, numerator=0, denominator=None, *empty, _normalize=True):
if empty:
raise TypeError('too many positional arguments')
...
but I'm not interested in it [and honestly, I'm sick of uglifying my code just to be able to run it on Py2]. Also, Mark Dickinson said (http://bugs.python.org/issue27539#msg273282) it shouldn't even be changed on Py3.5, so surely then it shouldn't be changed on Py2.7. :-)
I think no deprecation is needed: it isn't (https://docs.python.org/3.5/library/fractions.html?highlight=fraction#fractions.Fraction), and as far as I know has never been, documented.
----------
components: +Library (Lib)
versions: +Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27832>
_______________________________________
More information about the Python-bugs-list
mailing list