1. 06 Aug, 2002 6 commits
    • Guido van Rossum's avatar
      Add next and __iter__ to the list of file methods that should raise · 3c668c12
      Guido van Rossum authored
      ValueError when called for a closed file.
      3c668c12
    • Guido van Rossum's avatar
      SF patch 580331 by Oren Tirosh: make file objects their own iterator. · 7a6e9594
      Guido van Rossum authored
      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.
      
      The real purpose of this change is to reduce the confusion between
      objects and their iterators.  By making a file its own iterator, it's
      made clearer that using the iterator modifies the file object's state
      (in particular the current position).
      
      A nice side effect is that this speeds up "for line in f:" by not
      having to use the xreadlines module.  The f.xreadlines() method is
      still supported for backwards compatibility, though it is the same as
      iter(f) now.
      
      (I made some cosmetic changes to Oren's code, and added a test for
      "file closed" to file_iternext() and file_iter().)
      7a6e9594
    • Jack Jansen's avatar
      In the altbininstall target, which is the first subtarget for "make install", · 3a451b1d
      Jack Jansen authored
      if we are running in an OSX framework enabled build directory, test that
      the framework infrastructure exists. This catches the very common
      error of doing "make install" in stead of "make frameworkinstall".
      3a451b1d
    • Jack Jansen's avatar
      Patch #567296 by Pim Buurman, slightly modified by me so it can be disabled · 9c5b61b2
      Jack Jansen authored
      at compile time: use PBGetCatInfoSync() to get FInfo data in stead of
      GetFInfo. The latter doesn't work for folders. The former does, at
      least on OSX, and insofar the info makes sense for a folder.
      9c5b61b2
    • Jack Jansen's avatar
      Wrapper around _IBCarbon. · 137d8c56
      Jack Jansen authored
      137d8c56
    • Andrew M. Kuchling's avatar
      Mention list.sort() · 950725f7
      Andrew M. Kuchling authored
      Document heapq module
      Add PEP263 section (not sure I really understand the PEP's effect on 8-bit
         strings, though -- will have to experiment with it)
      950725f7
  2. 05 Aug, 2002 30 commits
  3. 04 Aug, 2002 4 commits