/external/python/cpython3/Lib/test/ |
D | 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 …]
|
D | test_operator.py | 496 self.assertEqual(operator.length_hint([], 2), 0) 497 self.assertEqual(operator.length_hint(iter([1, 2, 3])), 3) 499 self.assertEqual(operator.length_hint(X(2)), 2) 500 self.assertEqual(operator.length_hint(X(NotImplemented), 4), 4) 501 self.assertEqual(operator.length_hint(X(TypeError), 12), 12) 503 operator.length_hint(X("abc")) 505 operator.length_hint(X(-2)) 507 operator.length_hint(X(LookupError))
|
D | 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)
|
D | test_itertools.py | 2045 self.assertEqual(operator.length_hint(repeat(None, 50)), 50) 2046 self.assertEqual(operator.length_hint(repeat(None, 0)), 0) 2047 self.assertEqual(operator.length_hint(repeat(None), 12), 12) 2050 self.assertEqual(operator.length_hint(repeat(None, -1)), 0) 2051 self.assertEqual(operator.length_hint(repeat(None, -2)), 0) 2052 self.assertEqual(operator.length_hint(repeat(None, times=-1)), 0) 2053 self.assertEqual(operator.length_hint(repeat(None, times=-2)), 0)
|
D | test_struct.py | 732 lh = operator.length_hint
|
/external/openscreen/third_party/abseil/src/absl/strings/ |
D | cord.cc | 374 static CordRep* NewFlat(size_t length_hint) { in NewFlat() argument 375 if (length_hint <= kMinFlatLength) { in NewFlat() 376 length_hint = kMinFlatLength; in NewFlat() 377 } else if (length_hint > kMaxFlatLength) { in NewFlat() 378 length_hint = kMaxFlatLength; in NewFlat() 382 const size_t size = RoundUpForTag(length_hint + kFlatOverhead); in NewFlat()
|
/external/webrtc/third_party/abseil-cpp/absl/strings/ |
D | cord.cc | 457 static CordRep* NewFlat(size_t length_hint) { in NewFlat() argument 458 if (length_hint <= kMinFlatLength) { in NewFlat() 459 length_hint = kMinFlatLength; in NewFlat() 460 } else if (length_hint > kMaxFlatLength) { in NewFlat() 461 length_hint = kMaxFlatLength; in NewFlat() 465 const size_t size = RoundUpForTag(length_hint + kFlatOverhead); in NewFlat()
|
/external/libtextclassifier/abseil-cpp/absl/strings/ |
D | cord.cc | 378 static CordRep* NewFlat(size_t length_hint) { in NewFlat() argument 379 if (length_hint <= kMinFlatLength) { in NewFlat() 380 length_hint = kMinFlatLength; in NewFlat() 381 } else if (length_hint > kMaxFlatLength) { in NewFlat() 382 length_hint = kMaxFlatLength; in NewFlat() 386 const size_t size = RoundUpForTag(length_hint + kFlatOverhead); in NewFlat()
|
/external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/strings/ |
D | cord.cc | 378 static CordRep* NewFlat(size_t length_hint) { in NewFlat() argument 379 if (length_hint <= kMinFlatLength) { in NewFlat() 380 length_hint = kMinFlatLength; in NewFlat() 381 } else if (length_hint > kMaxFlatLength) { in NewFlat() 382 length_hint = kMaxFlatLength; in NewFlat() 386 const size_t size = RoundUpForTag(length_hint + kFlatOverhead); in NewFlat()
|
/external/abseil-cpp/absl/strings/ |
D | cord.cc | 457 static CordRep* NewFlat(size_t length_hint) { in NewFlat() argument 458 if (length_hint <= kMinFlatLength) { in NewFlat() 459 length_hint = kMinFlatLength; in NewFlat() 460 } else if (length_hint > kMaxFlatLength) { in NewFlat() 461 length_hint = kMaxFlatLength; in NewFlat() 465 const size_t size = RoundUpForTag(length_hint + kFlatOverhead); in NewFlat()
|
/external/python/cpython3/Lib/ |
D | operator.py | 185 def length_hint(obj, default=0): function
|
/external/python/cpython3/Doc/library/ |
D | operator.rst | 241 .. function:: length_hint(obj, default=0)
|
/external/python/cpython3/Doc/c-api/ |
D | object.rst | 319 equivalent to the Python expression ``operator.length_hint(o, default)``.
|
/external/python/cpython3/Doc/whatsnew/ |
D | 3.4.rst | 1160 New function :func:`~operator.length_hint` provides an implementation of the 1925 of :func:`operator.length_hint`. (Contributed by Armin Ronacher in
|
/external/python/cpython3/Doc/reference/ |
D | datamodel.rst | 2230 Called to implement :func:`operator.length_hint`. Should return an estimated
|
/external/python/cpython3/Misc/ |
D | HISTORY | 4679 - Issue #16148: Implement PEP 424, adding operator.length_hint and
|