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 rhettinger
Recipients docs@python, methane, rhettinger
Date 2011-03-07.07:14:07
SpamBayes Score 0.0015584572
Marked as misclassified No
Message-id <1299482047.96.0.491439902316.issue11425@psf.upfronthosting.co.za>
In-reply-to
Content
Sorry, but I think many of these changes should not be made.

Sometime the tight spacing is used for visual grouping.  The following look fine and should not be changed because adding spaces around the + or * operator makes the whole sentence harder to mentally parse correctly:

   sum(x*y for x,y in zip(xvec, yvec))
   a, b = b, a+b

Also, it is perfectly correct to use:
   raise StopIteration
We use the parentheses when there is an argument:
   raise KeyError('key not found: {!r}'.format(k))

Sometimes one-liners are okay in the interactive mode for quick filter functions and whatnot.  Spreading them out with '...' lines makes the example harder to follow and expands the set-up part of the example rather than the part being explained.

It's perfectly valid to use x * x * x instead of x**3 in an example of how to use map.  We want the example to be as simple as possible.  

Also, the interactive prompt examples should be left as-is.  They communicate the free-form nature of experimentation at the prompt.
History
Date User Action Args
2011-03-07 07:14:08rhettingersetrecipients: + rhettinger, methane, docs@python
2011-03-07 07:14:07rhettingersetmessageid: <1299482047.96.0.491439902316.issue11425@psf.upfronthosting.co.za>
2011-03-07 07:14:07rhettingerlinkissue11425 messages
2011-03-07 07:14:07rhettingercreate