[Python-checkins] CVS: python/nondist/peps pep-0234.txt,1.3,1.4

Guido van Rossum gvanrossum@users.sourceforge.net
Mon, 23 Apr 2001 13:05:01 -0700


Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv15273

Modified Files:
	pep-0234.txt 
Log Message:
Add discussion about next() vs. __next__().  So far I'm liking next()
jut fine.


Index: pep-0234.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0234.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pep-0234.txt	2001/04/23 18:31:46	1.3
--- pep-0234.txt	2001/04/23 20:04:59	1.4
***************
*** 98,101 ****
--- 98,108 ----
      use an iterator (as opposed to a sequence) in a for loop.
  
+     Discussion: should the next() method be renamed to __next__()?
+     Every other method corresponding to a tp_<something> slot has a
+     special name.  On the other hand, this would suggest that there
+     should also be a primitive operation next(x) that would call
+     x.__next__(), and this just looks like adding complexity without
+     benefit.  So I think it's better to stick with next().
+ 
  
  Python API Specification