Home
last modified time | relevance | path

Searched refs:__index__ (Results 1 – 25 of 61) 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.py285 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
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
464 def __index__(self): return 1 member in RangeTest.test_types.C2
Dtest_getargs2.py59 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
Dtest_slice.py68 def __index__(self): member in MyIndexable
Dtest_bytes.py43 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
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_class.py471 __index__ = __int__ variable in ClassTests.testBadTypeReturned.BadTypeClass
Dtest_memoryio.py17 def __index__(self): member in IntLike
19 __int__ = __index__
Dtest_call.py525 def __index__(self): member in FastCallTests.test_fastcall_clearing_dict.IntWithDict
Dtest_cmath.py225 def __index__(self): return 2 member in CMathTests.test_user_object.Index
/third_party/python/Doc/c-api/
Dlong.rst119 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 …]
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.py196 size = size.__index__()
210 size = size.__index__()
Doperator.py89 return a.__index__()
427 __index__ = index variable
D_pyio.py576 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__
Dnumbers.py308 def __index__(self): member in Integral
Dplistlib.py78 def __index__(self): member in UID
/third_party/python/Doc/library/
Dfunctions.rst124 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 …]
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/python/Lib/multiprocessing/
Dconnection.py118 handle = handle.__index__()
851 waithandle_to_obj[o.__index__()] = o
/third_party/littlefs/scripts/
Dreadmdir.py152 def __index__(self): member in Tag

123