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

Class Indexable

Lib/test/test_struct.py:285–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283 # to pack as integers. That is assuming the implemented
284 # '__index__' method returns an 'int'.
285 class Indexable(object):
286 def __init__(self, value):
287 self._value = value
288
289 def __index__(self):
290 return self._value
291
292 # If the '__index__' method raises a type error, then
293 # '__int__' should be used with a deprecation warning.

Callers 1

runMethod · 0.70

Calls

no outgoing calls

Tested by 1

runMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…