[Python-checkins] python/nondist/peps pep-0323.txt,1.3,1.4

rhettinger@users.sourceforge.net rhettinger at users.sourceforge.net
Tue Jun 28 10:46:42 CEST 2005


Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25380
Modified Files:
	pep-0323.txt 
Log Message:
Add comments to 323.
Index: pep-0323.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0323.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pep-0323.txt	2 Jan 2004 09:15:55 -0000	1.3
+++ pep-0323.txt	28 Jun 2005 08:46:39 -0000	1.4
@@ -7,7 +7,7 @@
 Type: Standards Track
 Content-Type: text/plain
 Created: 25-Oct-2003
-Python-Version: 2.4
+Python-Version: 2.5
 Post-History: 29-Oct-2003
 
 
@@ -19,6 +19,18 @@
 might exploit such a __copy__ method when present.
 
 
+Update and Comments
+
+ Support for __copy__ was included in Py2.4's itertools.tee().
+
+ Adding __copy__ methods to existing iterators will change the
+ behavior under tee(). Currently, the copied iterators remain
+ tied to the original iterator. If the original advances, then
+ so do all of the copies. Good practice is to overwrite the
+ original so that anamolies don't result: a,b=tee(a).
+ Code that doesn't follow that practice may observe a semantic
+ change if a __copy__ method is added to an iterator.
+
 Motivation
 
 In Python up to 2.3, most built-in iterator types don't let the user


More information about the Python-checkins mailing list

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