| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
support for it here.
|
| |
|
|
|
|
| |
Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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???)
|
|
|
|
|
| |
domain socket. Fix that and make the error message for failures a
little more helpful by including the class name.
|
| |
|
|
|
|
|
|
|
|
|
| |
I know some people don't like this -- if it's really controversial,
I'll take it out again. (If it's only Alex Martelli who doesn't like
it, that doesn't count as "real controversial" though. :-)
That's why this is a separate checkin from the iterators stuff I'm
about to check in next.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Weak*Dictionary.update(): No longer create a temporary list to hold the
things that will be stuffed into the underlying dictionary. This had
been done so that if any of the objects used as the weakly-held value
was not weakly-referencable, no updates would take place (TypeError
would be raised). With this change, TypeError will still be raised
but a partial update could occur. This is more like other .update()
implementations.
Thoughout, use of the name "ref" as a local variable has been removed. The
original use of the name occurred when the function to create a weak
reference was called "new"; the overloaded use of the name could be
confusing for someone reading the code. "ref" used as a variable name
has been replaced with "wr" (for 'weak reference').
|
|
|
|
|
| |
used to be omitted (meaning use the current time) as of Python 2.1.
Users who need cross-version portability need to know things like this.
|
|
|
|
| |
installations.
|
|
|
|
| |
*DE*compression objects, not compression objects!
|
|
|
|
| |
support.
|
|
|
|
|
| |
module has been included since Python 2.0, and that is the preferred
interface.
|
|
|
|
| |
introducing a new term ("regex") without defining it.
|
| |
|
|
|
|
|
|
| |
(Note that the docs are also being maintained on the 2.1.1 maintenance
branch, so users interested only in corrections and clarifications
can get that.)
|
|
|
|
|
|
| |
\versionadded macro.
Note: this should not be merged into the 2.1 maintenance branch.
|
|
|
|
| |
all reported by Bruce Smith.
|
|
|
|
|
|
| |
(Note that the docs are also being maintained on the 2.1.1 maintenance
branch, so users interested only in corrections and clarifications
can get that.)
|
| |
|
|
|
|
| |
it's 2.2 before the first alpha release.
|
|
|
|
| |
PyChecker.
|
| |
|
|
|
|
|
|
|
|
| |
variables reported by PyChecker.
__togglegentype(): PyChecker accurately reported that the variable
__gentypevar was unused -- actually this whole method is currently
unused so comment it out.
|
|
|
|
| |
reported by PyChecker.
|
| |
|
|
|
|
|
| |
this tool was last touched! Update some of the introductory material
and bump the version to 1.1.
|
|
|
|
| |
bite people interested in 1.5.2 compatibility.
|
|
|
|
|
|
|
|
| |
macro.
Refactored do_cmd_versionadded() and do_cmd_versionchanged() to do most
of the work in a helper function, with the do_cmd_*() wrappers just supplying
a portion of the replacement text.
|
|
|
|
| |
the versioning information, similar to \versionchanged.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The changes cause compilation failures in any file in the Python
installation lib directory to cause the install to fail. It looks
like compileall.py intended to behave this way, but a change to
py_compile.py and a separate bug defeated it.
Fixes SF bug #412436
This change affects the test suite, which contains several files that
contain intentional errors. The solution is to extend compileall.py
with the ability to skip compilation of selected files.
NB compileall.py is changed so that compile_dir() returns success only
if all recursive calls to compile_dir() also check success.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The changes cause compilation failures in any file in the Python
installation lib directory to cause the install to fail. It looks
like compileall.py intended to behave this way, but a change to
py_compile.py and a separate bug defeated it.
Fixes SF bug #412436
This change affects the test suite, which contains several files that
contain intentional errors. The solution is to extend compileall.py
with the ability to skip compilation of selected files.
In the test suite, rename nocaret.py and test_future[3..7].py to start
with badsyntax_nocaret.py and badsyntax_future[3..7].py. Update the
makefile to skip compilation of these files. Update the tests to use
the name names for imports.
NB compileall.py is changed so that compile_dir() returns success only
if all recursive calls to compile_dir() also check success.
|
| |
|
| |
|
|
|
|
| |
Hopefully this is the last checkin for 2.1!
|
|
|
|
|
| |
Import OPT_ symbols from _symtable.
Define has_exec() and has_import_star().
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
file was deleted by a previous call to the visitor function.
This used to be the behavior in 1.5.2 and before, but a patch to avoid
making two stat() calls accidentally broke this in 2.0.
Moshe, this would be a good one for 2.0.1 too!
|
| |
|
|
|
|
| |
recently reported bug; also exposed some other bugs in the implementation.
|
|
|
|
|
|
|
|
| |
parameter.
Weak*Dictionary.get(): Make the second parameter optional.
WeakKeyDictionary.has_key(), .keys(): Make these actually work!
|
|
|
|
|
|
|
|
|
|
| |
its first return statement returns a single value while its caller
always expects it to return a tuple of two items. Fix this by
returning (s, 0) instead.
This won't make the locale test on Irix succeed, but now it will fail
because of a bug in the platform's en_US locale rather than because of
a bug in the locale module.
|
| |
|
| |
|