/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 | 286 def __index__(self): member in IntTestCases.test_int_base_indexable.MyIndexable 383 def __index__(self): member in IntTestCases.test_intconversion.Index 432 def __index__(self): member in IntTestCases.test_int_subclass_with_index.MyIndex 436 def __index__(self): member in IntTestCases.test_int_subclass_with_index.BadIndex 464 def __index__(self): member in IntTestCases.test_int_returns_int_subclass.BadIndex 468 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 443 def __index__(self): return 1 member in RangeTest.test_types.C2
|
D | test_getargs2.py | 57 def __index__(self): member in Index 61 def __index__(self): member in IndexIntSubclass 65 def __index__(self): member in BadIndex 69 def __index__(self): member in BadIndex2 73 def __index__(self): member in BadIndex3
|
D | test_slice.py | 68 def __index__(self): member in MyIndexable
|
D | test_bytes.py | 41 def __index__(self): member in Indexable 121 def __index__(self): member in BaseBytesTest.test_from_mutating_list.X 128 def __index__(self): member in BaseBytesTest.test_from_mutating_list.Y 151 def __index__(self): member in BaseBytesTest.test_from_buffer.B 212 def __index__(self): member in BaseBytesTest.test_constructor_exceptions.BadInt 1007 def __index__(self): member in BytesTest.test_custom.A
|
D | test_class.py | 471 __index__ = __int__ variable in ClassTests.testBadTypeReturned.BadTypeClass
|
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_memoryio.py | 17 def __index__(self): member in IntLike 19 __int__ = __index__
|
D | test_cmath.py | 225 def __index__(self): return 2 member in CMathTests.test_user_object.Index
|
D | test_call.py | 524 def __index__(self): member in FastCallTests.test_fastcall_clearing_dict.IntWithDict
|
/third_party/python/Doc/c-api/ |
D | long.rst | 128 instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or 138 Use :meth:`__index__` if available. 147 instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or 159 Use :meth:`__index__` if available. 171 instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or 181 Use :meth:`__index__` if available. 190 instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or 204 Use :meth:`__index__` if available. 279 :meth:`__index__` or :meth:`__int__` method (if present) to convert 289 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 | 205 size = size.__index__() 220 size = size.__index__()
|
D | operator.py | 89 return a.__index__() 427 __index__ = index variable
|
D | numbers.py | 304 def __index__(self): member in Integral
|
D | _pyio.py | 552 size_index = size.__index__ 632 b = bytearray(size.__index__()) 933 size_index = size.__index__ 975 pos_index = pos.__index__ 1004 pos_index = pos.__index__ 2515 size_index = size.__index__ 2553 size_index = size.__index__
|
D | plistlib.py | 78 def __index__(self): member in UID
|
/third_party/python/Doc/library/ |
D | functions.rst | 86 has to define an :meth:`__index__` method that returns an integer. Some 325 to :meth:`__index__`. 340 Falls back to :meth:`__index__` if :meth:`__complex__` and 603 to :meth:`__index__`. 629 Falls back to :meth:`__index__` if :meth:`__float__` is not defined. 733 :meth:`__index__` method that returns an integer. Some examples: 804 ``int(x)`` returns ``x.__int__()``. If *x* defines :meth:`__index__`, 805 it returns ``x.__index__()``. If *x* defines :meth:`__trunc__`, 826 :meth:`base.__index__ <object.__index__>` method, that method is called 828 :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/littlefs/scripts/ |
D | readmdir.py | 152 def __index__(self): member in Tag
|
/third_party/python/Lib/multiprocessing/ |
D | connection.py | 118 handle = handle.__index__() 851 waithandle_to_obj[o.__index__()] = o
|