Home
last modified time | relevance | path

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

123

/external/python/cpython3/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_range.py306 def __index__(self): member in RangeTest.test_user_index_method.I
313 def __index__(self): member in RangeTest.test_user_index_method.IX
319 def __index__(self): member in RangeTest.test_user_index_method.IN
439 def __index__(self): return 1 member in RangeTest.test_types.C2
Dtest_slice.py68 def __index__(self): member in MyIndexable
Dtest_cmath.py225 def __index__(self): return 2 member in CMathTests.test_user_object.MyInt
228 def __index__(self): return 2 member in CMathTests.test_user_object.MyIntOS
Dtest_bytes.py39 def __index__(self): member in Indexable
119 def __index__(self): member in BaseBytesTest.test_from_mutating_list.X
126 def __index__(self): member in BaseBytesTest.test_from_mutating_list.Y
149 def __index__(self): member in BaseBytesTest.test_from_buffer.B
208 def __index__(self): member in BaseBytesTest.test_constructor_exceptions.BadInt
876 def __index__(self): member in BytesTest.test_custom.A
Dtest_struct.py273 def __index__(self): member in StructTest.test_integers.IntTester.run.Indexable
279 def __index__(self): member in StructTest.test_integers.IntTester.run.BadIndex
Dtest_class.py471 __index__ = __int__ variable in ClassTests.testBadTypeReturned.BadTypeClass
Dtest_int.py285 def __index__(self): member in IntTestCases.test_int_base_indexable.MyIndexable
/external/python/cpython2/Lib/test/
Dtest_index.py9 def __index__(self): member in oldstyle
13 def __index__(self): member in newstyle
17 def __index__(self): member in TrapInt
21 def __index__(self): member in TrapLong
48 self.assertEqual(6 .__index__(), 6)
49 self.assertEqual(-7L.__index__(), -7)
50 self.assertEqual(self.o.__index__(), 4)
51 self.assertEqual(self.n.__index__(), 5)
52 self.assertEqual(True.__index__(), 1)
53 self.assertEqual(False.__index__(), 0)
[all …]
Dtest_cmath.py172 def __index__(self): return 2 member in CMathTests.test_user_object.MyInt
176 def __index__(self): return 2 member in CMathTests.test_user_object.MyIntOS
Dtest_struct.py301 def __index__(self): member in StructTest.test_integers.IntTester.run.Indexable
307 def __index__(self): member in StructTest.test_integers.IntTester.run.BadIndex
/external/python/cpython2/Doc/library/
Dfuture_builtins.rst46 use the :meth:`__index__` method on its argument to get an integer that is
61 use the :meth:`__index__` method on its argument to get an integer that is
Dstruct.rst224 codes, if the non-integer has a :meth:`__index__` method then that method is
226 :meth:`__index__` method exists, or the call to :meth:`__index__` raises
231 Use of the :meth:`__index__` method for non-integers is new in 2.7.
Doperator.rst121 __index__(a)
123 Return *a* converted to an integer. Equivalent to ``a.__index__()``.
/external/python/cpython2/Lib/test/crashers/
Dbuffer_mutate.py18 def __index__(self): member in PseudoIndex
/external/python/cpython3/Lib/
Dbz2.py212 size = size.__index__()
227 size = size.__index__()
Doperator.py89 return a.__index__()
431 __index__ = index variable
D_pyio.py506 size_index = size.__index__
581 b = bytearray(size.__index__())
875 size_index = size.__index__
917 pos_index = pos.__index__
946 pos_index = pos.__index__
2448 size_index = size.__index__
2486 size_index = size.__index__
Dnumbers.py304 def __index__(self): member in Integral
/external/python/cpython2/Lib/
Dnumbers.py305 def __index__(self): member in Integral
D_pyio.py560 b = bytearray(n.__index__())
859 pos.__index__
886 pos.__index__
1870 n.__index__
/external/python/cpython3/Lib/multiprocessing/
Dconnection.py118 handle = handle.__index__()
840 waithandle_to_obj[o.__index__()] = o
/external/python/cpython3/Doc/library/
Doperator.rst111 __index__(a)
113 Return *a* converted to an integer. Equivalent to ``a.__index__()``.
Dstruct.rst263 codes, if the non-integer has a :meth:`__index__` method then that method is
267 Use of the :meth:`__index__` method for non-integers is new in 3.2.
/external/tensorflow/tensorflow/python/framework/
Dtensor_shape.py227 def __index__(self): member in Dimension

123