1. 02 May, 2001 2 commits
  2. 01 May, 2001 6 commits
  3. 30 Apr, 2001 1 commit
  4. 29 Apr, 2001 1 commit
    • Tim Peters's avatar
      SF bug #417093: Case sensitive import: dir and .py file w/ same name · cab3f68f
      Tim Peters authored
      Directory containing
          Spam.py
          spam/__init__.py
      Then "import Spam" caused a SystemError, because code checking for
      the existence of "Spam/__init__.py" finds it on a case-insensitive
      filesystem, but then bails because the directory it finds it in
      doesn't match case, and then old code assumed that was still an error
      even though it isn't anymore.  Changed the code to just continue
      looking in this case (instead of calling it an error).  So
          import Spam
      and
          import spam
      both work now.
      cab3f68f
  5. 28 Apr, 2001 2 commits
    • Tim Peters's avatar
      Fix buglet reported on c.l.py: map(fnc, file.xreadlines()) blows up. · 748b8bbe
      Tim Peters authored
      Also a 2.1 bugfix candidate (am I supposed to do something with those?).
      Took away map()'s insistence that sequences support __len__, and cleaned
      up the convoluted code that made it *look* like it really cared about
      __len__ (in fact the old ->len field was only *used* as a flag bit, as
      the main loop only looked at its sign bit, setting the field to -1 when
      IndexError got raised; renamed the field to ->saw_IndexError instead).
      748b8bbe
    • Tim Peters's avatar
      A different approach to the problem reported in · b3d8d1f7
      Tim Peters authored
      Patch #419651: Metrowerks on Mac adds 0x itself
      C std says %#x and %#X conversion of 0 do not add the 0x/0X base marker.
      Metrowerks apparently does.  Mark Favas reported the same bug under a
      Compaq compiler on Tru64 Unix, but no other libc broken in this respect
      is known (known to be OK under MSVC and gcc).
      So just try the damn thing at runtime and see what the platform does.
      Note that we've always had bugs here, but never knew it before because
      a relevant test case didn't exist before 2.1.
      b3d8d1f7
  6. 27 Apr, 2001 4 commits
  7. 26 Apr, 2001 2 commits
  8. 25 Apr, 2001 10 commits
  9. 24 Apr, 2001 1 commit
  10. 23 Apr, 2001 5 commits
    • Andrew M. Kuchling's avatar
      Fix typo in docstring · b3ca303a
      Andrew M. Kuchling authored
      b3ca303a
    • Andrew M. Kuchling's avatar
      Bump version # for final release · c42402fa
      Andrew M. Kuchling authored
      c42402fa
    • Marc-André Lemburg's avatar
      This patch originated from an idea by Martin v. Loewis who submitted a · 8155e0e5
      Marc-André Lemburg authored
      patch for sharing single character Unicode objects.
      
      Martin's patch had to be reworked in a number of ways to take Unicode
      resizing into consideration as well. Here's what the updated patch
      implements:
      
      * Single character Unicode strings in the Latin-1 range are shared
        (not only ASCII chars as in Martin's original patch).
      
      * The ASCII and Latin-1 codecs make use of this optimization,
        providing a noticable speedup for single character strings. Most
        Unicode methods can use the optimization as well (by virtue
        of using PyUnicode_FromUnicode()).
      
      * Some code cleanup was done (replacing memcpy with Py_UNICODE_COPY)
      
      * The PyUnicode_Resize() can now also handle the case of resizing
        unicode_empty which previously resulted in an error.
      
      * Modified the internal API _PyUnicode_Resize() and
        the public PyUnicode_Resize() API to handle references to
        shared objects correctly. The _PyUnicode_Resize() signature
        changed due to this.
      
      * Callers of PyUnicode_FromUnicode() may now only modify the Unicode
        object contents of the returned object in case they called the API
        with NULL as content template.
      
      Note that even though this patch passes the regression tests, there
      may still be subtle bugs in the sharing code.
      8155e0e5
    • Guido van Rossum's avatar
      Mondo changes to the iterator stuff, without changing how Python code · 213c7a6a
      Guido van Rossum authored
      sees it (test_iter.py is unchanged).
      
      - Added a tp_iternext slot, which calls the iterator's next() method;
        this is much faster for built-in iterators over built-in types
        such as lists and dicts, speeding up pybench's ForLoop with about
        25% compared to Python 2.1.  (Now there's a good argument for
        iterators. ;-)
      
      - Renamed the built-in sequence iterator SeqIter, affecting the C API
        functions for it.  (This frees up the PyIter prefix for generic
        iterator operations.)
      
      - Added PyIter_Check(obj), which checks that obj's type has a
        tp_iternext slot and that the proper feature flag is set.
      
      - Added PyIter_Next(obj) which calls the tp_iternext slot.  It has a
        somewhat complex return condition due to the need for speed: when it
        returns NULL, it may not have set an exception condition, meaning
        the iterator is exhausted; when the exception StopIteration is set
        (or a derived exception class), it means the same thing; any other
        exception means some other error occurred.
      213c7a6a
    • Guido van Rossum's avatar
      At the suggestion of Peter Funk, document 'key in dict' and 'key not · 8b3d6ca3
      Guido van Rossum authored
      in dict' after has_key(), with a \versionadded{2.2} note.
      8b3d6ca3
  11. 22 Apr, 2001 2 commits
  12. 21 Apr, 2001 4 commits