[Python-Dev] PEP 377 - allow enter() methods to skip the statement body (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Sun Mar 15 13:56:14 CET 2009
- Previous message: [Python-Dev] Python 2.6.2 and 3.0.2
- Next message: [Python-Dev] PEP 377 - allow __enter__() methods to skip the statement body
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
PEP 377 is a proposal to allow context manager enter() methods to skip the body of the with statement by raising a specific (new) flow control exception.
Since there is a working reference implementation now, I thought it was time to open it up for broader discussion.
Full PEP attached, or you can find it in the usual place at http://www.python.org/dev/peps/pep-0377
Cheers, Nick.
P.S. I expect a rationale for the StatementSkipped value binding is probably going to be pretty high on the list of questions that aren't currently covered by the PEP. I hope to write more on that some time this week.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
-------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pep-0377.txt URL: <http://mail.python.org/pipermail/python-dev/attachments/20090315/ba1df1e1/attachment.txt>
- Previous message: [Python-Dev] Python 2.6.2 and 3.0.2
- Next message: [Python-Dev] PEP 377 - allow __enter__() methods to skip the statement body
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]