[issue46282] print() docs do not indicate its return value
Barry A. Warsaw
report at bugs.python.org
Thu Jan 6 11:40:33 EST 2022
Barry A. Warsaw <barry at python.org> added the comment:
I think it does a better service to users to explain how Python returns None implicitly if a function doesn't have any other explicit return value. If the print() docs had this note, it would be confusing why other similar functions don't.
It's also worth explaining that when a function is designed to *explicitly* return None in certain cases (e.g. dict.get()) that it shouldn't do so implicitly, but should include an explicit `return None` for readability.
----------
nosy: +barry
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46282>
_______________________________________
More information about the Python-bugs-list
mailing list