Skip to content

Commit

Permalink
Even though returning a value from a validation method is ideal, by n…
Browse files Browse the repository at this point in the history
…o means is `proposal['value']` the only thing that can be returned (#855)

Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
  • Loading branch information
metaperl and blink1073 authored Sep 11, 2023
1 parent 4915986 commit b1cdea4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/source/using_traitlets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ Basic Example: Validating the Parity of a Trait
parity_check.parity = 1
Notice how all of the examples above return
``proposal['value']``. This is necessary for validation to work
``proposal['value']``. Returning a value
is necessary for validation to work
properly, since the new value of the trait will be the
return value of the function decorated by ``@validate``. If this
function does not have any ``return`` statement, then the returned
Expand Down

0 comments on commit b1cdea4

Please sign in to comment.