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 maltehelmert
Recipients docs@python, ezio.melotti, maltehelmert, terry.reedy
Date 2010-11-05.22:37:17
SpamBayes Score 2.120526e-14
Marked as misclassified No
Message-id <1288996640.4.0.934027495891.issue10304@psf.upfronthosting.co.za>
In-reply-to
Content
> 1. Rather than add a blank line to the output, the input should have
> the newline suppressed with \ (which has been done in previous
> examples).
> print("""\

I think that would be didactically bad after just mentioning that newlines in triple-quoted strings don't have to be escaped etc.
I think this would confuse the reader.

Better use print("""Usage...


> In interactive use, the interpreter will go to a new line anyway
> before printing the >>> prompt.

It won't (at least in Python 3.1). I just tried it.

> The intent and effect of end=' ' is that the outputs are all on one
> line (as with 2.x print) instead of each on a separate line

Sure. But I think that in an example that is essentially about whitespace produced by print, the actual whitespace in the output should match the actual behaviour of print. One why to get rid of this problem altogether is to add a 'print "done!"' or whatever at the end, or use a different separator from " ".
History
Date User Action Args
2010-11-05 22:37:20maltehelmertsetrecipients: + maltehelmert, terry.reedy, ezio.melotti, docs@python
2010-11-05 22:37:20maltehelmertsetmessageid: <1288996640.4.0.934027495891.issue10304@psf.upfronthosting.co.za>
2010-11-05 22:37:17maltehelmertlinkissue10304 messages
2010-11-05 22:37:17maltehelmertcreate