On 4/28/05, Stephen J. Turnbull <stephen at xemacs.org> wrote: > >>>>> "Guido" == Guido van Rossum <gvanrossum at gmail.com> writes: > > Guido> You mean like this? > > if x > 0: > ...normal case... > elif y > 0: > ....abnormal case... > else: > ...edge case... > > The salient example! If it's no accident that those conditions are > mutually exclusive and exhaustive, doesn't that code require at least > a comment saying so, and maybe even an assertion to that effect? I usually do: if ...: return ... if ...: return ... assert ... return ... Michael
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4