1. 29 Nis, 2002 1 kayıt (commit)
  2. 03 Ara, 2001 1 kayıt (commit)
  3. 04 Eki, 2001 1 kayıt (commit)
  4. 23 Eyl, 2001 1 kayıt (commit)
  5. 20 Eyl, 2001 1 kayıt (commit)
  6. 08 Eyl, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      Generalize operator.indexOf (PySequence_Index) to work with any · 16a77adf
      Tim Peters yazdı
      iterable object.  I'm not sure how that got overlooked before!
      
      Got rid of the internal _PySequence_IterContains, introduced a new
      internal _PySequence_IterSearch, and rewrote all the iteration-based
      "count of", "index of", and "is the object in it or not?" routines to
      just call the new function.  I suppose it's slower this way, but the
      code duplication was getting depressing.
      16a77adf
  7. 17 Agu, 2001 1 kayıt (commit)
    • Martin v. Löwis's avatar
      Patch #445762: Support --disable-unicode · 339d0f72
      Martin v. Löwis yazdı
      - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
      - check for Py_USING_UNICODE in all places that use Unicode functions
      - disables unicode literals, and the builtin functions
      - add the types.StringTypes list
      - remove Unicode literals from most tests.
      339d0f72
  8. 21 Haz, 2001 1 kayıt (commit)
  9. 06 May, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      Generalize zip() to work with iterators. · 8572b4fe
      Tim Peters yazdı
      NEEDS DOC CHANGES.
      More AttributeErrors transmuted into TypeErrors, in test_b2.py, and,
      again, this strikes me as a good thing.
      This checkin completes the iterator generalization work that obviously
      needed to be done.  Can anyone think of others that should be changed?
      8572b4fe
  10. 05 May, 2001 6 kayıt (commit)
    • Tim Peters's avatar
      Get rid of silly 5am "del" stmts. · ef0c42d4
      Tim Peters yazdı
      ef0c42d4
    • Tim Peters's avatar
      Reimplement PySequence_Contains() and instance_contains(), so they work · cb8d368b
      Tim Peters yazdı
      safely together and don't duplicate logic (the common logic was factored
      out into new private API function _PySequence_IterContains()).
      Visible change:
          some_complex_number  in  some_instance
      no longer blows up if some_instance has __getitem__ but neither
      __contains__ nor __iter__.  test_iter changed to ensure that remains true.
      cb8d368b
    • Tim Peters's avatar
    • Tim Peters's avatar
      Make 'x in y' and 'x not in y' (PySequence_Contains) play nice w/ iterators. · de9725f1
      Tim Peters yazdı
      NEEDS DOC CHANGES
      A few more AttributeErrors turned into TypeErrors, but in test_contains
      this time.
      The full story for instance objects is pretty much unexplainable, because
      instance_contains() tries its own flavor of iteration-based containment
      testing first, and PySequence_Contains doesn't get a chance at it unless
      instance_contains() blows up.  A consequence is that
          some_complex_number in some_instance
      dies with a TypeError unless some_instance.__class__ defines __iter__ but
      does not define __getitem__.
      de9725f1
    • Tim Peters's avatar
      Make unicode.join() work nice with iterators. This also required a change · 2cfe3682
      Tim Peters yazdı
      to string.join(), so that when the latter figures out in midstream that
      it really needs unicode.join() instead, unicode.join() can actually get
      all the sequence elements (i.e., there's no guarantee that the sequence
      passed to string.join() can be iterated over *again* by unicode.join(),
      so string.join() must not pass on the original sequence object anymore).
      2cfe3682
    • Tim Peters's avatar
      Generalize tuple() to work nicely with iterators. · 6912d4dd
      Tim Peters yazdı
      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
  11. 04 May, 2001 1 kayıt (commit)
  12. 03 May, 2001 4 kayıt (commit)
  13. 02 May, 2001 1 kayıt (commit)
  14. 01 May, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      Generalize list(seq) to work with iterators. This also generalizes list() · f553f89d
      Tim Peters yazdı
      to no longer insist that len(seq) be defined.
      NEEDS DOC CHANGES.
      This is meant to be a model for how other functions of this ilk (max,
      filter, etc) can be generalized similarly.  Feel encouraged to grab your
      favorite and convert it!
      Note some cute consequences:
          list(file) == file.readlines() == list(file.xreadlines())
          list(dict) == dict.keys()
          list(dict.iteritems()) = dict.items()
          list(xrange(i, j, k)) == range(i, j, k)
      f553f89d
  15. 21 Nis, 2001 1 kayıt (commit)