MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / __new__

Method __new__

Lib/fractions.py:68–166  ·  view source on GitHub ↗

Constructs a Fraction. Takes a string like '3/2' or '1.5', another Rational instance, a numerator/denominator pair, or a float. Examples -------- >>> Fraction(10, -8) Fraction(-5, 4) >>> Fraction(Fraction(1, 7), 5) Fraction(1, 35)

(cls, numerator=0, denominator=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 5

from_decimalMethod · 0.80
groupMethod · 0.80
gcdFunction · 0.70
from_floatMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected