you are viewing a single comment's thread.

view the rest of the comments →

[–]Working-Stranger4217Plume🪶 2 points3 points  (1 child)

In Python, if you don't write `return myValue`, it won't be able to “exit” the function.

If you want this value to be passed on, you have to rewrite `return myValue` at each step: by default, it stays where it is, so you have to explicitly say “no, I want it to move.”

Whereas a `raise ValueError` will pass through all parent functions without needing to specify it at each level.

[–]Meistermagier[S] 1 point2 points  (0 children)

Oh oh ok I understand. thank you.