A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-May/089358.html below:

[Python-Dev] multi-with statement

[Python-Dev] multi-with statementGeorg Brandl g.brandl at gmx.net
Sat May 2 21:01:28 CEST 2009
Hi,

this is just a short notice that Mattias Brändström and I have finished a
patch to implement the previously discussed and mostly warmly welcomed
extension to with's syntax, allowing

   with A() as a, B() as b:

to be written instead of

   with A() as a:
       with B() as b:

This syntax was chosen (over "with A(), B() as a, b:") because it has more
syntactical similarity to the written-out version.  Also, our current uses
of "as" all have only one expression on the right.

The patch implements it as a simple AST transformation, which guarantees
semantic equivalence.  It is at <http://codereview.appspot.com/53094>.

If there is no strong opposition, I will commit it and port it to py3k
before 3.1 enters beta stage.

cheers,
Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4