Message412811
> New learners coming to Python don't know the same things
> as people with experience.
IMO, new learners will be worse off by adding "returns None" to all of the builtins. At best it a distractor.
I work with new learners almost every day. The issue never arises. No one writes "x = print('hello world')" and they would be worse off if shown such a possibility.
One other consideration is that MyPy and the tools that use it (such as PyCharm) reject the idea of None as return value. Their view is that no value is returned all. We don't want the docs to contradict that world view.
$ cat hello.py
x = print('hello world')
$ mypy hello.py
hello.py:1: error: "print" does not return a value
Found 1 error in 1 file (checked 1 source file) |
|
Date |
User |
Action |
Args |
2022-02-08 05:16:47 | rhettinger | set | recipients:
+ rhettinger, barry, terry.reedy, nedbat, eric.araujo, steven.daprano, docs@python, iritkatriel, SnoopJeDi |
2022-02-08 05:16:47 | rhettinger | set | messageid: <1644297407.63.0.71423307235.issue46282@roundup.psfhosted.org> |
2022-02-08 05:16:47 | rhettinger | link | issue46282 messages |
2022-02-08 05:16:47 | rhettinger | create | |
|