[New-bugs-announce] [issue32466] Remove fractions._gcd()
Gordon P. Hemsley
report at bugs.python.org
Sun Dec 31 09:53:55 EST 2017
New submission from Gordon P. Hemsley <gphemsley at gphemsley.org>:
I noticed that there was a single line of Lib/fractions.py that did not have test coverage: the normalize step for fractions with non-integer numerators and/or denominators.
I initially was going to implement a test for that line, but upon further reflection, I cannot envision a scenario where that would be possible. The code already requires its initial parameters to be numbers.Rational and then normalizes their numerators and denominators to be integers.
So, instead, I propose to remove this check, first introduced in issue22486, and to roll the fractions._gcd() function up into the deprecated fractions.gcd().
----------
components: Library (Lib), Tests
messages: 309288
nosy: gphemsley, mark.dickinson, rhettinger
priority: normal
severity: normal
status: open
title: Remove fractions._gcd()
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32466>
_______________________________________
More information about the New-bugs-announce
mailing list