[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
- Previous message: [Python-checkins] python/nondist/peps pep-0000.txt, 1.334, 1.335 pep-0310.txt, 1.5, 1.6 pep-0319.txt, 1.1, 1.2 pep-0325.txt, 1.2, 1.3
- Next message: [Python-checkins] python/dist/src/Tools/bgen/bgen bgenBuffer.py, 1.10, 1.11 bgenStackBuffer.py, 1.4, 1.5 bgenStringBuffer.py, 1.4, 1.5 bgenType.py, 1.16, 1.17 bgenVariable.py, 1.7, 1.8 scantools.py, 1.38, 1.39
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
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
- Previous message: [Python-checkins] python/nondist/peps pep-0000.txt, 1.334, 1.335 pep-0310.txt, 1.5, 1.6 pep-0319.txt, 1.1, 1.2 pep-0325.txt, 1.2, 1.3
- Next message: [Python-checkins] python/dist/src/Tools/bgen/bgen bgenBuffer.py, 1.10, 1.11 bgenStackBuffer.py, 1.4, 1.5 bgenStringBuffer.py, 1.4, 1.5 bgenType.py, 1.16, 1.17 bgenVariable.py, 1.7, 1.8 scantools.py, 1.38, 1.39
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list