1. 04 Nis, 2006 1 kayıt (commit)
    • Thomas Wouters's avatar
      Make xrange more Py_ssize_t aware, by assuming a Py_ssize_t is always at · f4d8f390
      Thomas Wouters yazdı
      least as big as a long. I believe this to be a safe assumption that is being
      made in many parts of CPython, but a check could be added.
      
      len(xrange(sys.maxint)) works now, so fix the testsuite's odd exception for
      64-bit platforms too. It also fixes 'zip(xrange(sys.maxint), it)' as a
      portable-ish (if expensive) alternative to enumerate(it); since zip() now
      calls len(), this was breaking on (real) 64-bit platforms. No additional
      test was added for that behaviour.
      f4d8f390
  2. 14 Eki, 2004 1 kayıt (commit)
  3. 08 Agu, 2004 1 kayıt (commit)
    • Tim Peters's avatar
      Bug 1003935: xrange overflows · feec4533
      Tim Peters yazdı
      Added XXX comment about why the undocumented PyRange_New() API function
      is too broken to be worth the considerable pain of repairing.
      
      Changed range_new() to stop using PyRange_New().  This fixes a variety
      of bogus errors.  Nothing in the core uses PyRange_New() now.
      
      Documented that xrange() is intended to be simple and fast, and that
      CPython restricts its arguments, and length of its result sequence, to
      native C longs.
      
      Added some tests that failed before the patch, and repaired a test that
      relied on a bogus OverflowError getting raised.
      feec4533
  4. 08 Tem, 2004 1 kayıt (commit)