Message409874
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. |
|
Date |
User |
Action |
Args |
2022-01-06 16:40:33 | barry | set | recipients:
+ barry, steven.daprano, docs@python, SnoopJeDi |
2022-01-06 16:40:33 | barry | set | messageid: <1641487233.89.0.320464509297.issue46282@roundup.psfhosted.org> |
2022-01-06 16:40:33 | barry | link | issue46282 messages |
2022-01-06 16:40:33 | barry | create | |
|