Skip to content

Commit

Permalink
Document that return-less user-defined functions return None (pythonG…
Browse files Browse the repository at this point in the history
…H-126769)

(cherry picked from commit e0692f11650acb6c2eed940eb94650b4703c072e)

Co-authored-by: John Marshall <[email protected]>
Co-authored-by: Andrew Svetlov <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
  • Loading branch information
3 people authored and miss-islington committed Nov 14, 2024
1 parent 94e536e commit 62a3f72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Doc/reference/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down

0 comments on commit 62a3f72

Please sign in to comment.