Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ Ratio
Class
Ratio
Lib/test/test_fractions.py:286–290 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
284
pass
285
286
class
Ratio:
287
def
__init__(self, ratio):
288
self._ratio = ratio
289
def
as_integer_ratio(self):
290
return
self._ratio
291
292
293
class
FractionTest(unittest.TestCase):
Callers
2
testInitFromIntegerRatio
Method · 0.70
testFromNumber
Method · 0.70
Calls
no outgoing calls
Tested by
2
testInitFromIntegerRatio
Method · 0.56
testFromNumber
Method · 0.56
Used in the wild
real call sites across dependent graphs
searching dependent graphs…