Skip to content

Commit

Permalink
Document that return-less user-defined functions return None (GH-126769)
Browse files Browse the repository at this point in the history
(cherry picked from commit e0692f1)

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 3ed99b3 commit 37f8a09
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 @@ -1149,7 +1149,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 37f8a09

Please sign in to comment.