New syntax for blocks

Carl Banks pavlovevidence at
Wed Nov 11 05:02:03 CET 2009

On Nov 10, 11:23 am, r <rt8... at> wrote:
> if something_that_returns_value() as value:
>     #do something with value

Been proposed before.  No one has bothered to write a PEP for it, so I
can't say for sure how the Python gods would react, but I suspect a
"meh, don't think it's important enough".  This, even though it's more
useful than you are giving it credit for.  It's a minor improvement.

Carl Banks

More information about the Python-list mailing list