New submission from Peter Würtz: I think the PEP8 examples for arithmetic expressions are a bit misleading. (http://www.python.org/dev/peps/pep-0008/#id20)
The text clearly says that it should add spaces around operators of low(est) priority, which means that I'm encouraged to visually group an expression of high priority. It doesn't say (anymore?) that there should always be spaces around all arithmetic operators. This is however not reflected in the examples. In the examples "x = x*2 - 1" is listed as a negative example, while being perfectly compliant with the guide. Shouldn't this be in the "Yes" or an "Optionally" example block? I believe these examples may cause some people to interpret the style guide in a very rigid way, eventually leading to PEP8 formatting tools that flatten out nicely grouped expressions. ---------- assignee: docs@python components: Documentation messages: 172965 nosy: docs@python, pwuertz priority: normal severity: normal status: open title: PEP8 arithmetic operator examples type: enhancement _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16239> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com