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 docs@python, ezio.melotti, pwuertz, rhettinger
Date 2012-10-25.17:20:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1351185617.38.0.56111608403.issue16239@psf.upfronthosting.co.za>
In-reply-to
Content
Attached a patch that modifies some of the example in the section.

-      x = x * 2 - 1
-      hypot2 = x * x + y * y
+      x = x*2 - 1
+      hypot2 = x*x + y*y

Here I used more space around operators with lower priority.

-      x = x*2 - 1
-      hypot2 = x*x + y*y
-      c = (a+b) * (a-b)
+      x = x * 2-1
+      hypot2 = x*x + y * y
+      c = a+b * a-b

These 3 examples in the "No" section show respectively:
1) more space around the operator with higher priority;
2) inconsistent spacing around operators with the same priority;
3) misleading spacing (similar to 1);

I don't think it's necessary to mention 'x * 2 - 1' in either sections, because it's not wrong, but otoh 'x*2 - 1' is a better alternative.
History
Date User Action Args
2012-10-25 17:20:17ezio.melottisetrecipients: + ezio.melotti, rhettinger, docs@python, pwuertz
2012-10-25 17:20:17ezio.melottisetmessageid: <1351185617.38.0.56111608403.issue16239@psf.upfronthosting.co.za>
2012-10-25 17:20:17ezio.melottilinkissue16239 messages
2012-10-25 17:20:17ezio.melotticreate