OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:length_hint
(Results
1 - 6
of
6
) sorted by null
/external/python/cpython3/Lib/test/
test_iterlen.py
47
from operator import
length_hint
57
self.assertEqual(
length_hint
(it), i)
59
self.assertEqual(
length_hint
(it), 0)
61
self.assertEqual(
length_hint
(it), 0)
70
self.assertEqual(
length_hint
(it), n)
72
self.assertEqual(
length_hint
(it), n-1)
75
self.assertEqual(
length_hint
(it), 0)
155
self.assertEqual(
length_hint
(it), n - 2)
157
self.assertEqual(
length_hint
(it), n - 1) # grow with append
159
self.assertEqual(
length_hint
(it), 0
[
all
...]
test_enumerate.py
175
self.assertEqual(operator.
length_hint
(reversed(s)), len(s))
178
self.assertEqual(operator.
length_hint
(r), 0)
189
self.assertRaises(ZeroDivisionError, operator.
length_hint
, r)
test_operator.py
476
self.assertEqual(operator.
length_hint
([], 2), 0)
477
self.assertEqual(operator.
length_hint
(iter([1, 2, 3])), 3)
479
self.assertEqual(operator.
length_hint
(X(2)), 2)
480
self.assertEqual(operator.
length_hint
(X(NotImplemented), 4), 4)
481
self.assertEqual(operator.
length_hint
(X(TypeError), 12), 12)
483
operator.
length_hint
(X("abc"))
485
operator.
length_hint
(X(-2))
487
operator.
length_hint
(X(LookupError))
test_itertools.py
[
all
...]
test_struct.py
676
lh = operator.
length_hint
[
all
...]
/external/python/cpython3/Lib/
operator.py
18
'
length_hint
', 'lshift', 'lt', 'matmul', 'methodcaller', 'mod',
185
def
length_hint
(obj, default=0):
function
Completed in 175 milliseconds