[Python-checkins] python/dist/src/Lib urllib.py,1.154,1.155

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
2003年3月08日 21:33:35 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv26947/Lib
Modified Files:
	urllib.py 
Log Message:
SF 698520: Iterator for urllib.URLOpener
Contributed by Brett Cannon.
Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.154
retrieving revision 1.155
diff -C2 -d -r1.154 -r1.155
*** urllib.py	27 Feb 2003 20:14:43 -0000	1.154
--- urllib.py	9 Mar 2003 05:33:33 -0000	1.155
***************
*** 781,784 ****
--- 781,788 ----
 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):

AltStyle によって変換されたページ (->オリジナル) /