1. 08 May, 2001 9 kayıt (commit)
    • Tim Peters's avatar
      SF bug #422177: Results from .pyc differs from .py · 72f98e9b
      Tim Peters yazdı
      Store floats and doubles to full precision in marshal.
      Test that floats read from .pyc/.pyo closely match those read from .py.
      Declare PyFloat_AsString() in floatobject header file.
      Add new PyFloat_AsReprString() API function.
      Document the functions declared in floatobject.h.
      72f98e9b
    • Jack Jansen's avatar
      Removed some confusing sentences that are no longer relevant now that · 569c09c0
      Jack Jansen yazdı
      calldll is part of the standard macPython distribution.
      569c09c0
    • Fred Drake's avatar
      Michael Hudson <mwh21@cam.ac.uk>: · a6140be7
      Fred Drake yazdı
      Documentation update to reflect changes to the termios module (noting
      that the termios functions can take a file object as well as a file
      descriptor).
      
      This closes the documentation portion of SF patch #417081.
      a6140be7
    • Tim Peters's avatar
      SF patch #421922: Implement rich comparison for dicts. · e63415ea
      Tim Peters yazdı
      d1 == d2 and d1 != d2 now work even if the keys and values in d1 and d2
      don't support comparisons other than ==, and testing dicts for equality
      is faster now (especially when inequality obtains).
      e63415ea
    • Jeremy Hylton's avatar
      Fix several bugs and add two features. · 66a7e57c
      Jeremy Hylton yazdı
      Assertion error message had typos in arguments to string format.
      
      .cover files for modules in packages are now put in the right place.
      
      The code that generate .cover files seemed to prepend a "./" to many
      absolute paths, causing them to fail.  The code now checks explicitly
      for absolute paths and leaves them alone.
      
      In trace/coverage code, recover from case where module has no __name__
      attribute, when e.g. it is executed by PyRun_String().  In this case,
      assign modulename to None and hope for the best.  There isn't anywhere
      to write out coverage data for this code anyway.
      
      Also, replace several sys.stderr.writes with print >> sys.stderr.
      
      New features:
      
      -C/--coverdir dir: Generate .cover files in specified directory
      instead of in the directory where the .py file is.
      
      -s: Print a short summary of files coverred (# lines, % coverage,
      name)
      66a7e57c
    • Jeremy Hylton's avatar
      Several small changes. Mostly reformatting, adding parens. · 9c90105c
      Jeremy Hylton yazdı
      Check for free in class and method only if nested scopes are enabled.
      
      Add assertion to verify that no free variables occur when nested
      scopes are disabled.
      
      XXX When should nested scopes by made non-optional on the trunk?
      9c90105c
    • Jeremy Hylton's avatar
      SF patch 419176 from MvL; fixed bug 418977 · 4c889011
      Jeremy Hylton yazdı
      Two errors in dict_to_map() helper used by PyFrame_LocalsToFast().
      4c889011
    • Jeremy Hylton's avatar
      Remove unused variable · d37292bb
      Jeremy Hylton yazdı
      d37292bb
    • Tim Peters's avatar
      This is a test showing SF bug 422177. It won't trigger until I check in · 7ae2229a
      Tim Peters yazdı
      another change (to test_import.py, which simply imports the new file).  I'm
      checking this piece in now, though, to make it easier to distribute a patch
      for x-platform checking.
      7ae2229a
  2. 07 May, 2001 4 kayıt (commit)
  3. 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
  4. 05 May, 2001 11 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
    • Andrew M. Kuchling's avatar
      Skeletal version; I'm checking this in now so I can keep a list of changes, · a8defaae
      Andrew M. Kuchling yazdı
         but don't plan on actually writing any text until, ooh, say, July or
         thereabouts.
      a8defaae
    • Tim Peters's avatar
    • Tim Peters's avatar
      Remove redundant line. · 1434299a
      Tim Peters yazdı
      1434299a
    • 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
      Mark string.join() as done. Turns out string_join() works "for free" now, · 432b42aa
      Tim Peters yazdı
      because PySequence_Fast() started working for free as soon as
      PySequence_Tuple() learned how to work with iterators.  For some reason
      unicode.join() still doesn't work, though.
      432b42aa
    • Tim Peters's avatar
      Fix a tiny and unlikely memory leak. Was there before too, and actually · 12d0a6c7
      Tim Peters yazdı
      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 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
    • Tim Peters's avatar
      Make PyIter_Next() a little smarter (wrt its knowledge of iterator · f4848dac
      Tim Peters yazdı
      internals) so clients can be a lot dumber (wrt their knowledge).
      f4848dac
  5. 04 May, 2001 4 kayıt (commit)
  6. 03 May, 2001 11 kayıt (commit)