This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients barry, docs@python, ezio.melotti, gvanrossum, tlynn
Date 2013-11-12.14:41:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384267260.92.0.57998311048.issue19560@psf.upfronthosting.co.za>
In-reply-to
Content
See msg173785.

The example in the "no" section is not "wrong" -- it's just worse than the one in the "yes" section because it provides less hints about the groups and it's less readable, so it has no reason to be used.

If you note the introductory paragraph it says "Use your better judgment for the insertion of spaces around arithmetic operators.".  This means that even if the general rule is to add spaces around the operators, in some situations it is better to omit them, and one should decide on a case by case basis.

To provide a further example, see:
  a = 2 * (b+c)
and 
  a = 2*(b+c) - 2/(d+e)

The first part -- 2*(b+c) -- is the same in both the examples, but the spaces change depending on the context.  In the first case you can emphasize the multiplication between 2 and b+c, whereas in the second case there are two "groups" that get subtracted, so the spaces around the * and / can be removed to emphasize these two bigger groups.

I think that section is OK, and doesn't need to be changed.
History
Date User Action Args
2013-11-12 14:41:00ezio.melottisetrecipients: + ezio.melotti, gvanrossum, barry, tlynn, docs@python
2013-11-12 14:41:00ezio.melottisetmessageid: <1384267260.92.0.57998311048.issue19560@psf.upfronthosting.co.za>
2013-11-12 14:41:00ezio.melottilinkissue19560 messages
2013-11-12 14:41:00ezio.melotticreate