Docs don't explicitly describe an implicit return None
in user-defined function
#92753
Labels
docs
Documentation in the Doc dir
return None
in user-defined function
#92753
Documentation
Empirically, it is the case that when execution reaches the end of a user-defined function body without encountering a
return
statement, the function returnsNone
.And the docs hint at this in places! From here, in 6.3.4, emphasis added:
Later, in User-Defined Functions:
Additionally, here in 3.2:
But the reference doesn't actually come out and explicitly say what happens in the absence of a
return
statement.Possible Fix:
Ideally, I'd add one more sentence to the User-Defined functions section after the above quote:
The text was updated successfully, but these errors were encountered: