[Python-checkins] python/dist/src/Misc NEWS,1.454,1.455

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Tue, 06 Aug 2002 09:20:29 -0700


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv789

Modified Files:
	NEWS 
Log Message:
Files are now their own iterator.  The xreadlines method and module
are obsolete.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.454
retrieving revision 1.455
diff -C2 -d -r1.454 -r1.455
*** NEWS	5 Aug 2002 15:24:19 -0000	1.454
--- NEWS	6 Aug 2002 16:20:26 -0000	1.455
***************
*** 7,10 ****
--- 7,20 ----
  Core and builtins
  
+ - File objects are now their own iterators.  For a file f, iter(f) now
+   returns f (unless f is closed), and f.next() is similar to
+   f.readline() when EOF is not reached; however, f.next() uses a
+   readahead buffer that messes up the file position, so mixing
+   f.next() and f.readline() (or other methods) doesn't work right.
+   Calling f.seek() drops the readahead buffer, but other operations
+   don't.  It so happens that this gives a nice additional speed boost
+   to "for line in file:"; the xreadlines method and corresponding
+   module are now obsolete.
+ 
  - Encoding declarations (PEP 263, phase 1) have been implemented.  A
    comment of the form "# -*- coding: <encodingname> -*-" in the first
***************
*** 167,170 ****
--- 177,182 ----
  
  Extension modules
+ 
+ - The xreadlines module is slated for obsolescence.
  
  - The strptime function in the time module is now always available (a