MCPcopy Index your code
hub / github.com/python/cpython / check_iterator

Function check_iterator

Lib/wsgiref/validate.py:432–438  ·  view source on GitHub ↗
(iterator)

Source from the content-addressed store, hash-verified

430 # More exc_info checks?
431
432def check_iterator(iterator):
433 # Technically a bytestring is legal, which is why it's a really bad
434 # idea, because it may cause the response to be returned
435 # character-by-character
436 assert_(not isinstance(iterator, (str, bytes)),
437 "You should not return a string as your application iterator, "
438 "instead return a single-item list containing a bytestring.")

Callers 1

lint_appFunction · 0.85

Calls 1

assert_Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…