mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Document that return-less user-defined functions return None (#126769)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
This commit is contained in:
parent
73e34b6808
commit
e0692f1165
1 changed files with 2 additions and 1 deletions
|
@ -1156,7 +1156,8 @@ a user-defined function:
|
||||||
first thing the code block will do is bind the formal parameters to the
|
first thing the code block will do is bind the formal parameters to the
|
||||||
arguments; this is described in section :ref:`function`. When the code block
|
arguments; this is described in section :ref:`function`. When the code block
|
||||||
executes a :keyword:`return` statement, this specifies the return value of the
|
executes a :keyword:`return` statement, this specifies the return value of the
|
||||||
function call.
|
function call. If execution reaches the end of the code block without
|
||||||
|
executing a :keyword:`return` statement, the return value is ``None``.
|
||||||
|
|
||||||
a built-in function or method:
|
a built-in function or method:
|
||||||
.. index::
|
.. index::
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue