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

Guido van Rossum guido at python.org
Thu Apr 19 06:26:46 CEST 2012


On Wed, Apr 18, 2012 at 8:14 PM, Chris Angelico <rosuav at gmail.com> wrote:
> 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?

I meant the semicolon to be before 'however'.

-- 
--Guido van Rossum (python.org/~guido)


More information about the Python-Dev mailing list