[Python-ideas] with-statement syntactic quirk

Barry Warsaw barry at python.org
Thu Nov 1 07:33:16 CET 2012


On Oct 31, 2012, at 06:47 PM, Raymond Hettinger wrote:

>I would rather live a bashslash than have yet another change to the grammar
>or have context-manager semantics added to tuples.

Yeesh.  Despite the wink I guess people took me seriously about the tuples
thing.  I mean, really, c'mon! :)

>ISTM that this isn't a problem worth solving.  

There are certainly other ways to refactor away the long lines.  It's an odd
corner of syntactic quirkery that really only came about as I began removing
nested() calls, and nested context managers are already probably pretty rare.
It doesn't bother me that it's not worth "fixing" but I'm glad the discussion
is now captured for eternity in a mail archive.

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121101/a4f9ca70/attachment.pgp>


More information about the Python-ideas mailing list