diff options
author | Raymond Hettinger <python@rcn.com> | 2003-03-09 05:33:33 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-03-09 05:33:33 (GMT) |
commit | 42182ebaf6387371c238d2a3484e7f1e085c9d1c (patch) | |
tree | 8f66f70db6a3ee587fe392a07898179863abe3cc /Lib/urllib.py | |
parent | e9e20a98381bd7689f6813ac66e3400e1069757e (diff) | |
download | cpython-42182ebaf6387371c238d2a3484e7f1e085c9d1c.zip cpython-42182ebaf6387371c238d2a3484e7f1e085c9d1c.tar.gz cpython-42182ebaf6387371c238d2a3484e7f1e085c9d1c.tar.bz2 |
SF 698520: Iterator for urllib.URLOpener
Contributed by Brett Cannon.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index 24667ec..f486aee 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -780,6 +780,10 @@ class addbase: self.readline = self.fp.readline if hasattr(self.fp, "readlines"): self.readlines = self.fp.readlines if hasattr(self.fp, "fileno"): self.fileno = self.fp.fileno + if hasattr(self.fp, "__iter__"): + self.__iter__ = self.fp.__iter__ + if hasattr(self.fp, "next"): + self.next = self.fp.next def __repr__(self): return '<%s at %s whose fp = %s>' % (self.__class__.__name__, |