MCPcopy Index your code
hub / github.com/RustPython/RustPython / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

getproxiesFunction · 0.85
hasattrFunction · 0.85
setattrFunction · 0.85
methFunction · 0.85
itemsMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected