/third_party/python/Lib/test/ |
D | test_index.py | 7 def __index__(self): member in newstyle 11 def __index__(self): member in TrapInt 38 self.assertEqual(6 .__index__(), 6) 39 self.assertEqual(-7 .__index__(), -7) 40 self.assertEqual(self.o.__index__(), 4) 41 self.assertEqual(self.n.__index__(), 5) 42 self.assertEqual(True.__index__(), 1) 43 self.assertEqual(False.__index__(), 0) 62 def __index__(self): member in BaseTestCase.test_int_subclass_with_index.MyInt 66 direct_index = my_int.__index__() [all …]
|
D | test_int.py | 285 def __index__(self): member in IntTestCases.test_int_base_indexable.MyIndexable 382 def __index__(self): member in IntTestCases.test_intconversion.Index 431 def __index__(self): member in IntTestCases.test_int_subclass_with_index.MyIndex 435 def __index__(self): member in IntTestCases.test_int_subclass_with_index.BadIndex 463 def __index__(self): member in IntTestCases.test_int_returns_int_subclass.BadIndex 467 def __index__(self): member in IntTestCases.test_int_returns_int_subclass.BadIndex2
|
D | test_range.py | 316 def __index__(self): member in RangeTest.test_user_index_method.I 323 def __index__(self): member in RangeTest.test_user_index_method.IX 329 def __index__(self): member in RangeTest.test_user_index_method.IN 464 def __index__(self): return 1 member in RangeTest.test_types.C2
|
D | test_getargs2.py | 59 def __index__(self): member in Index 63 def __index__(self): member in IndexIntSubclass 67 def __index__(self): member in BadIndex 71 def __index__(self): member in BadIndex2 75 def __index__(self): member in BadIndex3
|
D | test_slice.py | 68 def __index__(self): member in MyIndexable
|
D | test_bytes.py | 43 def __index__(self): member in Indexable 123 def __index__(self): member in BaseBytesTest.test_from_mutating_list.X 130 def __index__(self): member in BaseBytesTest.test_from_mutating_list.Y 153 def __index__(self): member in BaseBytesTest.test_from_buffer.B 214 def __index__(self): member in BaseBytesTest.test_constructor_exceptions.BadInt 1009 def __index__(self): member in BytesTest.test_custom.A
|
D | test_struct.py | 274 def __index__(self): member in StructTest.test_integers.IntTester.run.Indexable 280 def __index__(self): member in StructTest.test_integers.IntTester.run.BadIndex
|
D | test_class.py | 471 __index__ = __int__ variable in ClassTests.testBadTypeReturned.BadTypeClass
|
D | test_memoryio.py | 17 def __index__(self): member in IntLike 19 __int__ = __index__
|
D | test_call.py | 525 def __index__(self): member in FastCallTests.test_fastcall_clearing_dict.IntWithDict
|
D | test_cmath.py | 225 def __index__(self): return 2 member in CMathTests.test_user_object.Index
|
/third_party/python/Doc/c-api/ |
D | long.rst | 119 instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method 128 Use :meth:`__index__` if available. 137 instance of :c:type:`PyLongObject`, first call its :meth:`__index__` 148 Use :meth:`__index__` if available. 160 instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method 169 Use :meth:`__index__` if available. 178 instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method 191 Use :meth:`__index__` if available. 265 an instance of :c:type:`PyLongObject`, first call its :meth:`__index__` 275 Use :meth:`__index__` if available. [all …]
|
D | float.rst | 50 If ``__float__()`` is not defined then it falls back to :meth:`__index__`. 55 Use :meth:`__index__` if available.
|
D | complex.rst | 134 to :meth:`__index__`. Upon failure, this method returns ``-1.0`` as a real 138 Use :meth:`__index__` if available.
|
/third_party/python/Lib/ |
D | bz2.py | 196 size = size.__index__() 210 size = size.__index__()
|
D | operator.py | 89 return a.__index__() 427 __index__ = index variable
|
D | _pyio.py | 576 size_index = size.__index__ 656 b = bytearray(size.__index__()) 957 size_index = size.__index__ 999 pos_index = pos.__index__ 1028 pos_index = pos.__index__ 2542 size_index = size.__index__ 2580 size_index = size.__index__
|
D | numbers.py | 308 def __index__(self): member in Integral
|
D | plistlib.py | 78 def __index__(self): member in UID
|
/third_party/python/Doc/library/ |
D | functions.rst | 124 has to define an :meth:`__index__` method that returns an integer. Some 368 to :meth:`__index__`. 383 Falls back to :meth:`__index__` if :meth:`__complex__` and 650 to :meth:`__index__`. 676 Falls back to :meth:`__index__` if :meth:`__float__` is not defined. 787 :meth:`__index__` method that returns an integer. Some examples: 858 ``int(x)`` returns ``x.__int__()``. If *x* defines :meth:`__index__`, 859 it returns ``x.__index__()``. If *x* defines :meth:`__trunc__`, 880 :meth:`base.__index__ <object.__index__>` method, that method is called 882 :meth:`base.__int__ <object.__int__>` instead of :meth:`base.__index__ [all …]
|
D | operator.rst | 111 __index__(a) 113 Return *a* converted to an integer. Equivalent to ``a.__index__()``.
|
D | struct.rst | 258 codes, if the non-integer has a :meth:`__index__` method then that method is 262 Added use of the :meth:`__index__` method for non-integers.
|
/third_party/python/Lib/ctypes/test/ |
D | test_numbers.py | 129 def __index__(self): member in NumberTestCase.test_integers.IndexLike
|
/third_party/python/Lib/multiprocessing/ |
D | connection.py | 118 handle = handle.__index__() 851 waithandle_to_obj[o.__index__()] = o
|
/third_party/littlefs/scripts/ |
D | readmdir.py | 152 def __index__(self): member in Tag
|