1. 05 May, 2001 3 commits
    • Tim Peters's avatar
      Fix a tiny and unlikely memory leak. Was there before too, and actually · 12d0a6c7
      Tim Peters authored
      several of these turned up and got fixed during the iteration crusade.
      12d0a6c7
    • Tim Peters's avatar
      Generalize tuple() to work nicely with iterators. · 6912d4dd
      Tim Peters authored
      NEEDS DOC CHANGES.
      This one surprised me!  While I expected tuple() to be a no-brainer, turns
      out it's actually dripping with consequences:
      1. It will *allow* the popular PySequence_Fast() to work with any iterable
         object (code for that not yet checked in, but should be trivial).
      2. It caused two std tests to fail.  This because some places used
         PyTuple_Sequence() (the C spelling of tuple()) as an indirect way to test
         whether something *is* a sequence.  But tuple() code only looked for the
         existence of sq->item to determine that, and e.g. an instance passed
         that test whether or not it supported the other operations tuple()
         needed (e.g., __len__).  So some things the tests *expected* to fail
         with an AttributeError now fail with a TypeError instead.  This looks
         like an improvement to me; e.g., test_coercion used to produce 559
         TypeErrors and 2 AttributeErrors, and now they're all TypeErrors.  The
         error details are more informative too, because the places calling this
         were *looking* for TypeErrors in order to replace the generic tuple()
         "not a sequence" msg with their own more specific text, and
         AttributeErrors snuck by that.
      6912d4dd
    • Tim Peters's avatar
      Make PyIter_Next() a little smarter (wrt its knowledge of iterator · f4848dac
      Tim Peters authored
      internals) so clients can be a lot dumber (wrt their knowledge).
      f4848dac
  2. 04 May, 2001 4 commits
  3. 03 May, 2001 13 commits
  4. 02 May, 2001 12 commits
  5. 01 May, 2001 6 commits
  6. 30 Apr, 2001 1 commit
  7. 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