This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mwh
Recipients
Date 2005-07-11.10:09:53
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
This large patch (nearly 90 K, affecting 25 files!) implements PEP 
343.

Work done:

Changes Grammar/Grammar, Python/compile.c and Python/ceval.c 
to support new statement (a new opcode, LOAD_EXIT_ARGS, is 
possibly not strictly needed, but the stack yoga to avoid it would be 
very tiring).

Implements a new __future__ statement, "with_statement", by 
cribbing the '#if 0'ed out code from when generators were optional.

Implements support for the with statement in Lib/compiler (but Lib/
compiler doesn't support future statements at all?).

Updates Lib/opcode.py, Lib/symbol.py.

Updates the parser module and it's tests.

Lib/test/test_with.py contains a couple of doctests, one a 
reasonably comprehensive tour of with statement functionality and 
the other is intended to contain the examples from the PEP, but 
most of these depend on PEP 342, the implementation of which 
hasn't been checked in yet.

The code isn't the prettiest in places (esp search for the two XXXs).
History
Date User Action Args
2007-08-23 15:43:31adminlinkissue1235943 messages
2007-08-23 15:43:31admincreate