>>>>> "Guido" == Guido van Rossum <[EMAIL PROTECTED]> 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?
Where you can use a switch, it gives both, and throws in economy in
both source and object code as a bonus.
Not a compelling argument---your example shows switches are not
universally applicable---but it's a pretty good deal.
Guido> You have guts to call that bad style! :-)
Exaggeration in defense of elegance is no vice.<wink>
--
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com