Skip to content

Commit 4fd6288

Browse files
miss-islingtonjmarshallasvetlovwillingc
authored
[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 e0692f1) Co-authored-by: John Marshall <[email protected]> Co-authored-by: Andrew Svetlov <[email protected]> Co-authored-by: Carol Willing <[email protected]>
1 parent 94e536e commit 4fd6288

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/reference/expressions.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,8 @@ a user-defined function:
11561156
first thing the code block will do is bind the formal parameters to the
11571157
arguments; this is described in section :ref:`function`. When the code block
11581158
executes a :keyword:`return` statement, this specifies the return value of the
1159-
function call.
1159+
function call. If execution reaches the end of the code block without
1160+
executing a :keyword:`return` statement, the return value is ``None``.
11601161

11611162
a built-in function or method:
11621163
.. index::

0 commit comments

Comments
 (0)