MCPcopy Index your code
hub / github.com/python/cpython / __int__

Method __int__

Lib/fractions.py:947–952  ·  view source on GitHub ↗

int(a)

(a, _index=operator.index)

Source from the content-addressed store, hash-verified

945 return Fraction._from_coprime_ints(abs(a._numerator), a._denominator)
946
947 def __int__(a, _index=operator.index):
948 """int(a)"""
949 if a._numerator < 0:
950 return _index(-(-a._numerator // a._denominator))
951 else:
952 return _index(a._numerator // a._denominator)
953
954 def __trunc__(a):
955 """math.trunc(a)"""

Callers

nothing calls this directly

Calls 1

_indexFunction · 0.85

Tested by

no test coverage detected