Message409857
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. |
|
Date |
User |
Action |
Args |
2022-01-06 15:14:42 | steven.daprano | set | recipients:
+ steven.daprano, docs@python, SnoopJeDi |
2022-01-06 15:14:42 | steven.daprano | set | messageid: <1641482082.12.0.793901620769.issue46282@roundup.psfhosted.org> |
2022-01-06 15:14:42 | steven.daprano | link | issue46282 messages |
2022-01-06 15:14:42 | steven.daprano | create | |
|