1. 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
  2. 15 Agu, 2001 1 kayıt (commit)
  3. 10 Agu, 2001 1 kayıt (commit)
  4. 08 Agu, 2001 1 kayıt (commit)
    • Guido van Rossum's avatar
      Implement PEP 238 in its (almost) full glory. · 4668b000
      Guido van Rossum yazdı
      This introduces:
      
      - A new operator // that means floor division (the kind of division
        where 1/2 is 0).
      
      - The "future division" statement ("from __future__ import division)
        which changes the meaning of the / operator to implement "true
        division" (where 1/2 is 0.5).
      
      - New overloadable operators __truediv__ and __floordiv__.
      
      - New slots in the PyNumberMethods struct for true and floor division,
        new abstract APIs for them, new opcodes, and so on.
      
      I emphasize that without the future division statement, the semantics
      of / will remain unchanged until Python 3.0.
      
      Not yet implemented are warnings (default off) when / is used with int
      or long arguments.
      
      This has been on display since 7/31 as SF patch #443474.
      
      Flames to /dev/null.
      4668b000
  5. 07 Agu, 2001 1 kayıt (commit)
  6. 05 Agu, 2001 1 kayıt (commit)
  7. 02 Agu, 2001 1 kayıt (commit)
  8. 23 Nis, 2001 1 kayıt (commit)
    • Guido van Rossum's avatar
      Mondo changes to the iterator stuff, without changing how Python code · 213c7a6a
      Guido van Rossum yazdı
      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
  9. 20 Nis, 2001 1 kayıt (commit)
    • Guido van Rossum's avatar
      Iterators phase 1. This comprises: · 59d1d2b4
      Guido van Rossum yazdı
      new slot tp_iter in type object, plus new flag Py_TPFLAGS_HAVE_ITER
      new C API PyObject_GetIter(), calls tp_iter
      new builtin iter(), with two forms: iter(obj), and iter(function, sentinel)
      new internal object types iterobject and calliterobject
      new exception StopIteration
      new opcodes for "for" loops, GET_ITER and FOR_ITER (also supported by dis.py)
      new magic number for .pyc files
      new special method for instances: __iter__() returns an iterator
      iteration over dictionaries: "for x in dict" iterates over the keys
      iteration over files: "for x in file" iterates over lines
      
      TODO:
      
      documentation
      test suite
      decide whether to use a different way to spell iter(function, sentinal)
      decide whether "for key in dict" is a good idea
      use iterators in map/filter/reduce, min/max, and elsewhere (in/not in?)
      speed tuning (make next() a slot tp_next???)
      59d1d2b4
  10. 26 Şub, 2001 1 kayıt (commit)
  11. 02 Şub, 2001 1 kayıt (commit)
  12. 01 Şub, 2001 2 kayıt (commit)
  13. 24 Ock, 2001 2 kayıt (commit)
  14. 23 Ock, 2001 1 kayıt (commit)
  15. 17 Ock, 2001 3 kayıt (commit)
  16. 04 Ock, 2001 1 kayıt (commit)
  17. 10 Eyl, 2000 1 kayıt (commit)
    • Tim Peters's avatar
      Close SF bug 110826: a complaint about the way Python #define'd NULL. · 4826a894
      Tim Peters yazdı
      It's hard to sort out what the bug was, exactly.  So, Big Hammer:
      
      1. Python shouldn't be in the business of #define'ing NULL, period.
      2. Users of the Python C API shouldn't be in the business of not including
         Python.h, period.
      
      Hence:
      
      1. Removed all #define's of NULL in Python source code (pyport.h and
         object.h).
      2. Since we're *relying* on stdio.h defining NULL, put an #error in
         Python.h after its #include of stdio.h if NULL isn't defined then.
      4826a894
  18. 01 Eyl, 2000 1 kayıt (commit)
  19. 24 Agu, 2000 1 kayıt (commit)
  20. 16 Tem, 2000 1 kayıt (commit)
    • Thomas Wouters's avatar
      Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either · 7e474022
      Thomas Wouters yazdı
      comments, docstrings or error messages. I fixed two minor things in
      test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").
      
      There is a minor style issue involved: Guido seems to have preferred English
      grammar (behaviour, honour) in a couple places. This patch changes that to
      American, which is the more prominent style in the source. I prefer English
      myself, so if English is preferred, I'd be happy to supply a patch myself ;)
      7e474022
  21. 09 Tem, 2000 1 kayıt (commit)
  22. 08 Tem, 2000 2 kayıt (commit)
  23. 30 Haz, 2000 2 kayıt (commit)
  24. 29 Haz, 2000 1 kayıt (commit)
    • Fred Drake's avatar
      This patch addresses two main issues: (1) There exist some non-fatal · 13634cf7
      Fred Drake yazdı
      errors in some of the hash algorithms. For exmaple, in float_hash and
      complex_hash a certain part of the value is not included in the hash
      calculation. See Tim's, Guido's, and my discussion of this on
      python-dev in May under the title "fix float_hash and complex_hash for
      64-bit *nix"
      
      (2) The hash algorithms that use pointers (e.g. func_hash, code_hash)
      are universally not correct on Win64 (they assume that sizeof(long) ==
      sizeof(void*))
      
      As well, this patch significantly cleans up the hash code. It adds the
      two function _Py_HashDouble and _PyHash_VoidPtr that the various
      hashing routine are changed to use.
      
      These help maintain the hash function invariant: (a==b) =>
      (hash(a)==hash(b))) I have added Lib/test/test_hash.py and
      Lib/test/output/test_hash to test this for some cases.
      13634cf7
  25. 23 Haz, 2000 2 kayıt (commit)
    • Jeremy Hylton's avatar
      part 2 of Neil Schemenauer's GC patches: · d08b4c45
      Jeremy Hylton yazdı
      This patch modifies the type structures of objects that
      participate in GC.  The object's tp_basicsize is increased when
      GC is enabled.  GC information is prefixed to the object to
      maintain binary compatibility.  GC objects also define the
      tp_flag Py_TPFLAGS_GC.
      d08b4c45
    • Jeremy Hylton's avatar
      Round 1 of Neil Schemenauer's GC patches: · 8caad49c
      Jeremy Hylton yazdı
      This patch adds the type methods traverse and clear necessary for GC
      implementation.
      8caad49c
  26. 24 Nis, 2000 1 kayıt (commit)
    • Guido van Rossum's avatar
      Christian Tismer -- total rewrite on trashcan code. · e92e610a
      Guido van Rossum yazdı
      Improvements:
      - does no longer need any extra memory
      - has no relationship to tstate
      - works in debug mode
      - can easily be modified for free threading (hi Greg:)
      
      Side effects:
      Trashcan does change the order of object destruction.
      Prevending that would be quite an immense effort, as
      my attempts have shown. This version works always
      the same, with debug mode or not. The slightly
      changed destruction order should therefore be no problem.
      
      Algorithm:
      While the old idea of delaying the destruction of some
      obejcts at a certain recursion level was kept, we now
      no longer aloocate an object to hold these objects.
      The delayed objects are instead chained together
      via their ob_type field. The type is encoded via
      ob_refcnt. When it comes to the destruction of the
      chain of waiting objects, the topmost object is popped
      off the chain and revived with type and refcount 1,
      then it gets a normal Py_DECREF.
      
      I am confident that this solution is near optimum
      for minimizing side effects and code bloat.
      e92e610a
  27. 14 Nis, 2000 1 kayıt (commit)
  28. 21 Mar, 2000 1 kayıt (commit)
    • Fred Drake's avatar
      Updated comment: in PyTypeObject: · 0e12bcd2
      Fred Drake yazdı
      	/* More standard operations (at end for binary compatibility) */
      
      should now be:
      
      	/* More standard operations (here for binary compatibility) */
      
      since they're no longer at the end!
      0e12bcd2
  29. 13 Mar, 2000 1 kayıt (commit)
    • Guido van Rossum's avatar
      Christian Tismer's "trashcan" patch: · d724b234
      Guido van Rossum yazdı
      Added wrapping macros to dictobject.c, listobject.c, tupleobject.c,
      frameobject.c, traceback.c that safely prevends core dumps
      on stack overflow. Macros and functions in object.c, object.h.
      The method is an "elevator destructor" that turns cascading
      deletes into tail recursive behavior when some limit is hit.
      d724b234
  30. 01 Mar, 2000 1 kayıt (commit)
  31. 28 Şub, 2000 1 kayıt (commit)
  32. 20 Ock, 2000 1 kayıt (commit)
  33. 04 Ara, 1998 1 kayıt (commit)