[Python-ideas] Inline assignments using "given" clauses

Juancarlo Añez apalala at gmail.com
Sat May 12 18:47:11 EDT 2018


> My main point here is that "with" works as well as "given" in this form
> from an English prose point of view.
>

+1 for "with...as", -1 for ":="

About affecting existing contexts, it seems that "with..as" would create a
new context just for the expression, and the control statement it is
embedded in, similar to what the current "with" statement does. These are
semantics that are really easy to explain.

Cheers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180512/350fedd0/attachment.html>


More information about the Python-ideas mailing list