[Python-Dev] Suggested addition to PEP 8 for context managers

Chris Angelico rosuav at gmail.com
Thu Apr 19 05:14:17 CEST 2012

On Thu, Apr 19, 2012 at 1:06 PM, Eli Bendersky <eliben at gmail.com> wrote:
> (quoting GvR)
>> Let's change this to something more reasonable, e.g.
>> """
>> If operators with different priorities are used, consider adding
>> whitespace around the operators with the lowest priority(ies). This is
>> very much to taste, however, never use more than one space, and always
>> have the same amount of whitespace on both sides of a binary operator.
>> """
> +1, a very welcome change to a piece of PEP8 I've always felt
> uncomfortable with. Tiny nitpick: I'd just replace the comma following
> "however" with a period or semicolon.

Following or preceding? Either works, but there's a slight shift of
meaning depending on which punctuation gets the upgrade. What was the
original intent of the paragraph?

Chris Angelico

More information about the Python-Dev mailing list