Skip to content

Commit 81914ac

Browse files
committed
minor #5557 [2.3] [Contributing] Added note about empty returns (phansys)
This PR was merged into the 2.3 branch. Discussion ---------- [2.3] [Contributing] Added note about empty returns | Q | A | ------------- | --- | Doc fix? | no | New docs? | no | Applies to | | Fixed tickets | Commits ------- a6e9a10 [2.3] [Contributing] Added note about empty returns
2 parents 3bb1a25 + a6e9a10 commit 81914ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contributing/code/standards.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ Structure
112112
* Add a blank line before ``return`` statements, unless the return is alone
113113
inside a statement-group (like an ``if`` statement);
114114

115+
* Use just ``return;`` instead of ``return null;`` when a function must return void
116+
early;
117+
115118
* Use braces to indicate control structure body regardless of the number of
116119
statements it contains;
117120

0 commit comments

Comments
 (0)