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

Method index

Lib/test/test_class.py:488–489  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

486 __bool__ = __int__
487 __index__ = __int__
488 def index(x):
489 return [][x]
490
491 for f in [float, complex, str, repr, bytes, bin, oct, hex, bool, index]:
492 self.assertRaises(TypeError, f, BadTypeClass())

Callers 15

evaluate_slice_indexFunction · 0.45
slice_indicesFunction · 0.45
test_indexMethod · 0.45
test_index_bug_24913Method · 0.45
test_indexMethod · 0.45
test_uid_indexMethod · 0.45
test_indexMethod · 0.45
test_indexMethod · 0.45
add_eventMethod · 0.45
test_proxy_indexMethod · 0.45
_testMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected