Skip to content

Commit

Permalink
Document that return-less user-defined functions return None (#126769)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Svetlov <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
  • Loading branch information
3 people authored Nov 14, 2024
1 parent 73e34b6 commit e0692f1
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 e0692f1

Please sign in to comment.