Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> 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)

----------
nosy: +rhettinger

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46282>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to