- 20 Eki, 2003 1 kayıt (commit)
-
-
Walter Dörwald yazdı
(From SF patch #810751)
-
- 12 May, 2003 1 kayıt (commit)
-
-
Fred Drake yazdı
-
- 28 Şub, 2003 1 kayıt (commit)
-
-
Raymond Hettinger yazdı
-
- 25 Kas, 2002 1 kayıt (commit)
-
-
Michael W. Hudson yazdı
-
- 12 Agu, 2002 1 kayıt (commit)
-
-
Mark Hammond yazdı
Thanks to Skip Montanaro and Kalle Svensson for the patches.
-
- 08 May, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
Avoid checks for negative indices and duplicate checks for support of the sequence protocol.
-
- 05 Ock, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 28 Kas, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Change macros as requested by Guido
-
- 09 Kas, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
supports the single-segment readable buffer interface. Add documentation for this and other PyObject_XXXBuffer() calls.
-
- 28 Eki, 2001 1 kayıt (commit)
-
-
Fred Drake yazdı
PyObject_CallMethodObArgs() ---> PyObject_CallMethodObjArgs()
-
- 26 Eki, 2001 2 kayıt (commit)
-
-
Fred Drake yazdı
PyObject_CallFunctionObArgs() and PyObject_CallMethodObArgs() have the advantage that no format strings need to be parsed. The CallMethod variant also avoids creating a new string object in order to retrieve a method from an object as well.
-
Tim Peters yazdı
outer level, the iterator protocol is used for memory-efficiency (the outer sequence may be very large if fully materialized); at the inner level, PySequence_Fast() is used for time-efficiency (these should always be sequences of length 2). dictobject.c, new functions PyDict_{Merge,Update}FromSeq2. These are wholly analogous to PyDict_{Merge,Update}, but process a sequence-of-2- sequences argument instead of a mapping object. For now, I left these functions file static, so no corresponding doc changes. It's tempting to change dict.update() to allow a sequence-of-2-seqs argument too. Also changed the name of dictionary's keyword argument from "mapping" to "x". Got a better name? "mapping_or_sequence_of_pairs" isn't attractive, although more so than "mosop" <wink>. abstract.h, abstract.tex: Added new PySequence_Fast_GET_SIZE function, much faster than going thru the all-purpose PySequence_Size. libfuncs.tex: - Document dictionary(). - Fiddle tuple() and list() to admit that their argument is optional. - The long-winded repetitions of "a sequence, a container that supports iteration, or an iterator object" is getting to be a PITA. Many months ago I suggested factoring this out into "iterable object", where the definition of that could include being explicit about generators too (as is, I'm not sure a reader outside of PythonLabs could guess that "an iterator object" includes a generator call). - Please check my curly braces -- I'm going blind <0.9 wink>. abstract.c, PySequence_Tuple(): When PyObject_GetIter() fails, leave its error msg alone now (the msg it produces has improved since PySequence_Tuple was generalized to accept iterable objects, and PySequence_Tuple was also stomping on the msg in cases it shouldn't have even before PyObject_GetIter grew a better msg).
-
- 08 Eyl, 2001 1 kayıt (commit)
-
-
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.
-
- 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.
-
- 02 Agu, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
-
- 05 May, 2001 3 kayıt (commit)
-
-
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.
-
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.
-
Tim Peters yazdı
internals) so clients can be a lot dumber (wrt their knowledge).
-
- 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???)
-
- 21 Mar, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
APIs, PyObject_IsInstance() and PyObject_IsSubclass() -- both returning an int, or -1 for errors.
-
- 17 Ock, 2001 1 kayıt (commit)
-
-
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.
-
- 24 Agu, 2000 1 kayıt (commit)
-
-
Thomas Wouters yazdı
PySequence methods and functions, new tokens.
-
- 03 Agu, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
This doesn't change the copyright status for these files -- just the markings! Doing it on the main branch for these three files for which the HEAD revision was pushed back into 1.6.
-
- 17 Tem, 2000 1 kayıt (commit)
-
-
Marc-André Lemburg yazdı
New code will see the macros and therefore use the PyXXX_Size() APIs instead. By Thomas Wouters.
-
- 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 ;)
-
- 13 Tem, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
- 12 Tem, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
add macros for backwards compatibility with C source
-
- 09 Tem, 2000 1 kayıt (commit)
-
-
Fred Drake yazdı
-
- 30 Haz, 2000 2 kayıt (commit)
-
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
-
- 18 Haz, 2000 1 kayıt (commit)
-
-
Andrew M. Kuchling yazdı
this patch introduces PySequence_Fast and PySequence_Fast_GET_ITEM, and modifies the list.extend method to accept any kind of sequence.
-
- 10 Mar, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
PyObject_AsReadBuffer, PyObject_AsWriteBuffer.
-
- 17 Mar, 1999 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 04 Ara, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 23 Agu, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 22 May, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 09 Nis, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 04 Mar, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 14 Şub, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-