[docs] [issue19560] PEP 8 operator precedence across parens

Tom Lynn report at bugs.python.org
Tue Nov 12 14:33:52 CET 2013


New submission from Tom Lynn:

PEP 8 currently has::

  Yes::

      ...
      c = (a+b) * (a-b)

  No::

      ...
      c = (a + b) * (a - b)

That looks wrong to me -- surely the parens are a sufficient
precedence hint, and don't need further squashing inside?
This will be worse with any non-trivial example.  I suspect
it may also lead to silly complications in code formatting tools.

This was changed by Guido as part of a reversion in issue 16239,
but I wonder whether that example was intended to be included?

----------
assignee: docs at python
components: Documentation
messages: 202687
nosy: docs at python, tlynn
priority: normal
severity: normal
status: open
title: PEP 8 operator precedence across parens
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19560>
_______________________________________


More information about the docs mailing list