Javascript is turning into Python?!

Klaas mike.klaas at gmail.com
Sat Nov 4 05:46:33 CET 2006


Paul Rubin wrote:
> "Carl Banks" <pavlovevidence at gmail.com> writes:
> > > http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7
> > Maybe in exchange, Python can borrow the let statement.
>
> Maybe the with statement could be extended to allow binding more than
> one variable.
>     with x as f(), y as g():
>        blah (x, y)

from contextlib import nested

with nested(f(), g()) as (x, y):
   ....

-Mike




More information about the Python-list mailing list