[issue22486] Add math.gcd()

Mark Dickinson report at bugs.python.org
Sun Oct 5 11:32:45 CEST 2014


Mark Dickinson added the comment:

> I mean, there is already such a type check in Fraction.__init__()

That type-check doesn't protect us from non-int Integrals, though, as far as I can tell.  It looks to me as though doing `Fraction(numpy.int32(3), numpy.int32(2))` would fail with a TypeError after this patch.  (It works in Python 3.4.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22486>
_______________________________________


More information about the Python-bugs-list mailing list