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

Method _call_chain

Lib/urllib/request.py:459–468  ·  view source on GitHub ↗
(self, chain, kind, meth_name, *args)

Source from the content-addressed store, hash-verified

457 pass
458
459 def _call_chain(self, chain, kind, meth_name, *args):
460 # Handlers raise an exception if no one else should try to handle
461 # the request, or return None if they can't but another handler
462 # could. Otherwise, they return the response.
463 handlers = chain.get(kind, ())
464 for handler in handlers:
465 func = getattr(handler, meth_name)
466 result = func(*args)
467 if result is not None:
468 return result
469
470 def open(self, fullurl, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
471 # accept a URL or a Request object

Callers 2

_openMethod · 0.95
errorMethod · 0.95

Calls 2

funcFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected