Bugs item #1567375, was opened at 2006-09-28 19:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1567375&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: David Benbennick (dbenbenn)
Assigned to: Nobody/Anonymous (nobody)
Summary: False sentence about formatted print in tutorial section 7.1

Initial Comment:
The line:

(Note that one space between each column was added by
the way print works: it always adds spaces between its
arguments.)

in section 7.1 of the tutorial
(http://docs.python.org/dev/tut/node9.html), is false.
 It refers to the command

print '%2d %3d %4d' % (x, x*x, x*x*x)

which produces (if x == 10)

10 100 1000

The two spaces in that output are NOT "added by the way
print works".  Instead, they come from the format
string itself.  If you use

print '%2d%3d%4d' % (x, x*x, x*x*x)

you get

101001000

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1567375&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to