- 17 Agu, 2001 1 kayıt (commit)
-
-
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.
-
- 15 Agu, 2001 1 kayıt (commit)
-
-
Fred Drake yazdı
so the backward compatibility issues will be easier to understand. I only added comments indicating additions and assignments back to Python 2.0.
-
- 10 Agu, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
type is ready, and READYING to indicate that it is busy with the type. A recursive call is a fatal error.
-
- 08 Agu, 2001 1 kayıt (commit)
-
-
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.
-
- 07 Agu, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
- Add an explicit call to PyType_Ready(&PyList_Type) to pythonrun.c (just for the heck of it, really -- we should either explicitly ready all types, or none).
-
- 05 Agu, 2001 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 02 Agu, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
-
- 23 Nis, 2001 1 kayıt (commit)
-
-
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.
-
- 20 Nis, 2001 1 kayıt (commit)
-
-
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???)
-
- 26 Şub, 2001 1 kayıt (commit)
-
-
Fred Drake yazdı
so make it void.
-
- 02 Şub, 2001 1 kayıt (commit)
-
-
Fred Drake yazdı
field. This should avoid binary incompatibility problems with older modules that have not been recompiled.
-
- 01 Şub, 2001 2 kayıt (commit)
-
-
Jeremy Hylton yazdı
discussion on python-dev. 'from mod import *' is still banned except at the module level. Fix value for special NOOPT entry in symtable. Initialze to 0 instead of None, so that later uses of PyInt_AS_LONG() are valid. (Bug reported by Donn Cave.) replace local REPR macros with PyObject_REPR in object.h
-
Fred Drake yazdı
-
- 24 Ock, 2001 2 kayıt (commit)
-
-
Guido van Rossum yazdı
add it to the default flags.
-
Barry Warsaw yazdı
-
- 23 Ock, 2001 1 kayıt (commit)
-
-
Barry Warsaw yazdı
-
- 17 Ock, 2001 3 kayıt (commit)
-
-
Guido van Rossum yazdı
-
Marc-André Lemburg yazdı
except that it always returns Unicode objects. A new C API PyObject_Unicode() is also provided. This closes patch #101664. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
-
Guido van Rossum yazdı
- Removed the nb_add slot from the PyNumberMethods struct. - Renamed Py_TPFLAGS_NEWSTYLENUMBER to Py_TPFLAGS_CHECKTYPES. - Added typedef richcmpfunc. - Added tp_richcompare slot to PyTypeObject (replacing spare tp_xxx7). - Added APIs PyObject_RichCompare() and PyObject_RichCompareBool(). - Added rich comparison operators Py_LT through Py_GE.
-
- 04 Ock, 2001 1 kayıt (commit)
-
-
Neil Schemenauer yazdı
- Define type flag for new style numbers. - Add Py_NotImplemented.
-
- 10 Eyl, 2000 1 kayıt (commit)
-
-
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.
-
- 01 Eyl, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
This should match the situation in the 1.6b1 tree.
-
- 24 Agu, 2000 1 kayıt (commit)
-
-
Thomas Wouters yazdı
PySequence methods and functions, new tokens.
-
- 16 Tem, 2000 1 kayıt (commit)
-
-
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 ;)
-
- 09 Tem, 2000 1 kayıt (commit)
-
-
Fred Drake yazdı
the standard for Python implementation.
-
- 08 Tem, 2000 2 kayıt (commit)
-
-
Greg Stein yazdı
-
Tim Peters yazdı
Stein -- thanks!). Incidentally removed all the Py_PROTO macros from object.h, as they prevented my editor from magically finding the definitions of the "coercion", "cmpfunc" and "reprfunc" typedefs that were being redundantly applied in longobject.c.
-
- 30 Haz, 2000 2 kayıt (commit)
-
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
-
- 29 Haz, 2000 1 kayıt (commit)
-
-
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.
-
- 23 Haz, 2000 2 kayıt (commit)
-
-
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.
-
Jeremy Hylton yazdı
This patch adds the type methods traverse and clear necessary for GC implementation.
-
- 24 Nis, 2000 1 kayıt (commit)
-
-
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.
-
- 14 Nis, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Note that comparisons of deeply nested objects can still dump core in extreme cases.
-
- 21 Mar, 2000 1 kayıt (commit)
-
-
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!
-
- 13 Mar, 2000 1 kayıt (commit)
-
-
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.
-
- 01 Mar, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 28 Şub, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
a new proc type (objobjproc), a new slot sq_contains to PySequenceMethods, and a new flag Py_TPFLAGS_HAVE_SEQUENCE_IN to Py_TPFLAGS_DEFAULT. More to follow.
-
- 20 Ock, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
compilation on NT Alpha. Mostly added casts etc.
-
- 04 Ara, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-