Javascript is turning into Python?!

P

Paul Rubin

Carl Banks said:
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)
 
S

Steve Holden

Paul said:
Maybe the with statement could be extended to allow binding more than
one variable.
with x as f(), y as g():
blah (x, y)

Wouldn't that be

with f() as x, g() as y:
blah(x, y)

regards
Steve
 
K

Klaas

Paul said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top