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

Class addinfourl

Lib/urllib/response.py:68–84  ·  view source on GitHub ↗

class to add info() and geturl() methods to an open file.

Source from the content-addressed store, hash-verified

66
67
68class addinfourl(addinfo):
69 """class to add info() and geturl() methods to an open file."""
70
71 def __init__(self, fp, headers, url, code=None):
72 super(addinfourl, self).__init__(fp, headers)
73 self.url = url
74 self.code = code
75
76 @property
77 def status(self):
78 return self.code
79
80 def getcode(self):
81 return self.code
82
83 def geturl(self):
84 return self.url

Callers 3

open_local_fileMethod · 0.90
ftp_openMethod · 0.90
data_openMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…