diff options
| author | Sergey B Kirpichev <skirpichev@gmail.com> | 2023-02-27 21:53:22 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-27 18:53:22 +0000 |
| commit | 4f3786b7616dd464242b88ad6914053d409fe9d2 (patch) | |
| tree | 6bd17c96e33920a7e2e0e91b53adf65886e2bae7 /Objects/codeobject.c | |
| parent | bb0cf8fd60e71581a90179af63e60e8704c3814b (diff) | |
| download | cpython-git-4f3786b7616dd464242b88ad6914053d409fe9d2.tar.gz | |
gh-101773: Optimize creation of Fractions in private methods (#101780)
This PR adds a private `Fraction._from_coprime_ints` classmethod for internal creations of `Fraction` objects, replacing the use of `_normalize=False` in the existing constructor. This speeds up creation of `Fraction` objects arising from calculations. The `_normalize` argument to the `Fraction` constructor has been removed.
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Diffstat (limited to 'Objects/codeobject.c')
0 files changed, 0 insertions, 0 deletions
