Issue 1362: Simple mistake in http://docs.python.org/tut/node6.html (original) (raw)

Created on 2007-10-30 00:56 by dmazz, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg56948 - (view) Author: Dan M (dmazz) Date: 2007-10-30 00:56
In section 4.6 it says: Writing the value None is normally suppressed by the interpreter if it would be the only value written. When it should say: Writing the value None is normally displayed by the interpreter if it would be the only value written. Or less wordy: The value None is (normally) displayed by the interpreter when it would be the only value written.
msg56956 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-10-30 06:21
I fail to see the bug. The documentation is correct as it stands, ie. None is *not* displayed normally. IOW, writing is normally suppressed.
msg56961 - (view) Author: Dan M (dmazz) Date: 2007-10-30 13:07
Yes, it is normally suppressed. The problem is the condition when it is suppressed. The documentation states that it's suppressed when it's the only value to be written. It is suppressed when it's *not* the only value to be written. -or- (removing the double negative of suppressed(not displayed) and not) It is displayed when it would be the only value written. The example immediately following this mistake is correct, which makes the actual behavior obvious even if this particular statement is wrong.
msg56968 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-10-30 17:58
No, the text is correct, but the example is misleading -- I now changed it to >>> fib(0) >>> print fib(0) None which should make the difference between using and not using print clearer.
History
Date User Action Args
2022-04-11 14:56:27 admin set github: 45703
2007-10-30 17:58:14 georg.brandl set nosy: + georg.brandlmessages: +
2007-10-30 13:07:17 dmazz set messages: +
2007-10-30 06:21:09 loewis set status: open -> closedresolution: not a bugmessages: + nosy: + loewis
2007-10-30 00:56:54 dmazz create