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 steven.daprano
Recipients SnoopJeDi, docs@python, steven.daprano
Date 2022-01-06.15:14:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641482082.12.0.793901620769.issue46282@roundup.psfhosted.org>
In-reply-to
Content
Do the print docs need to mention something so obvious?

Functions and methods which operate by side-effect typically don't mention that they return None, see for example the docs for various builtin methods:

https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types

e.g. s.append, s.clear, s.extend, s.insert, s.remove, s.reverse

and likewise for list.sort, set.add, dict.clear and many others.

(However, dict.update is a rare exception, it does mention that it returns None.)

We should not feel it necessary to add an explicit comment to every function or method that operates by side-effect stating that they return None.
History
Date User Action Args
2022-01-06 15:14:42steven.dapranosetrecipients: + steven.daprano, docs@python, SnoopJeDi
2022-01-06 15:14:42steven.dapranosetmessageid: <1641482082.12.0.793901620769.issue46282@roundup.psfhosted.org>
2022-01-06 15:14:42steven.dapranolinkissue46282 messages
2022-01-06 15:14:42steven.dapranocreate