MCPcopy Create free account
hub / github.com/python/cpython / MyInt

Class MyInt

Lib/test/test_capi/test_misc.py:2311–2313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2309 def test_conversion_coerced(self):
2310 convert = _testinternalcapi.normalize_interp_id
2311 class MyInt(str):
2312 def __index__(self):
2313 return 10
2314 interpid = convert(MyInt())
2315 self.assertEqual(interpid, 10)
2316

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…