Home
last modified time | relevance | path

Searched refs:__index__ (Results 1 – 25 of 58) sorted by relevance

123

/third_party/python/Lib/test/
Dtest_index.py7 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 …]
Dtest_int.py286 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
Dtest_range.py316 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
Dtest_getargs2.py57 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
Dtest_slice.py68 def __index__(self): member in MyIndexable
Dtest_bytes.py41 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
Dtest_class.py471 __index__ = __int__ variable in ClassTests.testBadTypeReturned.BadTypeClass
Dtest_struct.py274 def __index__(self): member in StructTest.test_integers.IntTester.run.Indexable
280 def __index__(self): member in StructTest.test_integers.IntTester.run.BadIndex
Dtest_memoryio.py17 def __index__(self): member in IntLike
19 __int__ = __index__
Dtest_cmath.py225 def __index__(self): return 2 member in CMathTests.test_user_object.Index
Dtest_call.py524 def __index__(self): member in FastCallTests.test_fastcall_clearing_dict.IntWithDict
/third_party/python/Doc/c-api/
Dlong.rst128 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 …]
Dfloat.rst50 If ``__float__()`` is not defined then it falls back to :meth:`__index__`.
55 Use :meth:`__index__` if available.
Dcomplex.rst134 to :meth:`__index__`. Upon failure, this method returns ``-1.0`` as a real
138 Use :meth:`__index__` if available.
/third_party/python/Lib/
Dbz2.py205 size = size.__index__()
220 size = size.__index__()
Doperator.py89 return a.__index__()
427 __index__ = index variable
Dnumbers.py304 def __index__(self): member in Integral
D_pyio.py552 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__
Dplistlib.py78 def __index__(self): member in UID
/third_party/python/Doc/library/
Dfunctions.rst86 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 …]
Doperator.rst111 __index__(a)
113 Return *a* converted to an integer. Equivalent to ``a.__index__()``.
Dstruct.rst258 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/
Dtest_numbers.py129 def __index__(self): member in NumberTestCase.test_integers.IndexLike
/third_party/littlefs/scripts/
Dreadmdir.py152 def __index__(self): member in Tag
/third_party/python/Lib/multiprocessing/
Dconnection.py118 handle = handle.__index__()
851 waithandle_to_obj[o.__index__()] = o

123