[3.13] Document that return-less user-defined functions return None (GH-126769) (#126822)

Document that return-less user-defined functions return None (GH-126769)
(cherry picked from commit e0692f1165)

Co-authored-by: John Marshall <jmarshall@hey.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
This commit is contained in:
Miss Islington (bot) 2024-11-14 10:46:58 +01:00 committed by GitHub
parent 94e536e283
commit 4fd628837c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1156,7 +1156,8 @@ a user-defined function:
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
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:
.. index::