[3.11] gh-68163: Correct conversion of Rational instances to float (GH-25619) (#96556)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-09-08 04:03:53 -07:00 committed by GitHub
parent e72f469e85
commit ae819ca6fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 4 deletions

View file

@ -288,7 +288,7 @@ class Rational(Real):
so that ratios of huge integers convert without overflowing.
"""
return self.numerator / self.denominator
return int(self.numerator) / int(self.denominator)
class Integral(Rational):