[Python-ideas] Allow with (x as y, z as w):

Guido van Rossum guido at python.org
Tue Apr 26 11:32:22 EDT 2016

Also, I think some people are too fundamentalist about rejecting all uses
of \ to break long lines. When combined with proper indentation of the
continuation line, if there is no alternative, I think it looks better than
artifically introduced parentheses. At least if there's only one or two
continuation lines. E.g.
very_long_variable_name = \
looks better to me than
very_long_variable_name = (
I'm just saying, there's a reason PEP 8's motto is "A Foolish Consistency
is the Hobgoblin of Little Minds".

On Tue, Apr 26, 2016 at 8:22 AM, Barry Warsaw <barry at python.org> wrote:

> On Apr 25, 2016, at 12:36 PM, Cory Benfield wrote:
> >This request has come up a couple of times before.
> ...
> >The upshot is: the restriction on context managers with parentheses like
> this
> >is relatively likely to stick around.
> I highly recommend looking at contextlib.ExitStack.  Once I started using
> this idiom, I found I wanted the requested with-feature much less
> frequently.
> Cheers,
> -Barry
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160426/95b01e17/attachment.html>

More information about the Python-ideas mailing list