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

Method __init__

Lib/urllib/request.py:766–775  ·  view source on GitHub ↗
(self, proxies=None)

Source from the content-addressed store, hash-verified

764 handler_order = 100
765
766 def __init__(self, proxies=None):
767 if proxies is None:
768 proxies = getproxies()
769 assert hasattr(proxies, 'keys'), "proxies must be a mapping"
770 self.proxies = proxies
771 for type, url in proxies.items():
772 type = type.lower()
773 setattr(self, '%s_open' % type,
774 lambda r, proxy=url, type=type, meth=self.proxy_open:
775 meth(r, proxy, type))
776
777 def proxy_open(self, req, proxy, type):
778 orig_type = req.type

Callers

nothing calls this directly

Calls 4

getproxiesFunction · 0.85
methFunction · 0.85
itemsMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected