History for Lib/fractions.py - python/cpython · GitHub

github.com

Tin mới

gh-72902: Speedup Fraction.from_decimal/float in typical cases (GH-133251)

gh-72902: Speedup Fraction.from_decimal/float in typical cases (GH-133251)

gh-87790: support thousands separators for formatting fractional part of Fraction (#132204)

gh-87790: support thousands separators for formatting fractional part of Fraction (#132204)

gh-130664: Treat '0' fill character with align '=' as zero-padding for Fraction's (GH-131067)

gh-130664: Treat '0' fill character with align '=' as zero-padding for Fraction's (GH-131067)

gh-130662: Accept leading zeros in precision/width for Fraction's formatting (#130663)

gh-130662: Accept leading zeros in precision/width for Fraction's formatting (#130663)

gh-72902: improve Fraction constructor speed for typical inputs (GH-134320)

gh-72902: improve Fraction constructor speed for typical inputs (GH-134320)

gh-133306: Use \z instead of \Z in regular expressions in the stdlib (GH-133337)

gh-133306: Use \z instead of \Z in regular expressions in the stdlib (GH-133337)

gh-130104: Call __rpow__ in ternary pow() if necessary (GH-130251)

gh-130104: Call __rpow__ in ternary pow() if necessary (GH-130251)

gh-121797: Add class method Fraction.from_number() (GH-121800)

gh-121797: Add class method Fraction.from_number() (GH-121800)

gh-82017: Support as_integer_ratio() in the Fraction constructor (GH-120271)

gh-82017: Support as_integer_ratio() in the Fraction constructor (GH-120271)

gh-119838: Treat Fraction as a real value in mixed arithmetic operations with complex (GH-119839)

gh-119838: Treat Fraction as a real value in mixed arithmetic operations with complex (GH-119839)

gh-119189: Fix the power operator for Fraction (GH-119242)

gh-119189: Fix the power operator for Fraction (GH-119242)

gh-119594: Improve pow(fraction.Fraction(), b, modulo) error message (#119593)

gh-119594: Improve pow(fraction.Fraction(), b, modulo) error message (#119593)

gh-102840: Fix confused traceback when floordiv or mod operations happens between Fraction and complex objects (GH-102842)

gh-102840: Fix confused traceback when floordiv or mod operations happens between Fraction and complex objects (GH-102842)

gh-114014: Update `fractions.Fraction()`'s rational parsing regex (#114015)

gh-114014: Update `fractions.Fraction()`'s rational parsing regex (#114015)

gh-67790: Support basic formatting for Fraction (#111320)

gh-67790: Support basic formatting for Fraction (#111320)

gh-101825: Clarify that as_integer_ratio() output is always normalized (#101843)

gh-101825: Clarify that as_integer_ratio() output is always normalized (#101843)

gh-101773: Optimize creation of Fractions in private methods (#101780)

gh-101773: Optimize creation of Fractions in private methods (#101780)

gh-67790: Support float-style formatting for Fraction instances (#100161)

gh-67790: Support float-style formatting for Fraction instances (#100161)

gh-91851: Micro optimizations for arithmetic between Fractions (#25518)

gh-91851: Micro optimizations for arithmetic between Fractions (#25518)

gh-91851: Trivial optimizations in Fraction (#100791)

gh-91851: Trivial optimizations in Fraction (#100791)

gh-100488: Add is_integer method to fractions.Fraction (#100489)

gh-100488: Add is_integer method to fractions.Fraction (#100489)

GH-96465: Cache hashes for Fraction instances (GH-96483)

GH-96465: Cache hashes for Fraction instances (GH-96483)

Allow whitespace around a slash in fraction string inputs (GH-96496)

Allow whitespace around a slash in fraction string inputs (GH-96496)

Minor optimization for Fractions.limit_denominator (GH-93730)

Minor optimization for Fractions.limit_denominator (GH-93730)

bpo-44547: Make Fractions objects instances of typing.SupportsInt (GH-27851)

bpo-44258: support PEP 515 for Fraction's initialization from string (GH-26422)

Trivial change in fractions module docs: real -> rational numbers (GH-25009)

bpo-44154: optimize Fraction pickling (GH-26186)

bpo-43420: Simple optimizations for Fraction's arithmetics (GH-24779)

bpo-39350: Fix fractions for int subclasses (GH-18375)

bpo-39274: Ensure Fraction.__bool__() returns a bool (GH-18017)

bpo-39350: Remove deprecated fractions.gcd() (GH-18021)

Add a minor `Fraction.__hash__()` optimization (GH-15313)

bpo-37863: Optimize Fraction.__hash__() (#15298)

bpo-37819: Add Fraction.as_integer_ratio() (GH-15212)