Where is CASE?????
D-Man
dsh8290 at rit.edu
Tue Feb 20 10:05:49 EST 2001
On Tue, Feb 20, 2001 at 02:18:03PM +0000, Chris Withers wrote:
| Steve Purcell wrote:
| >
| > Chris Richard Adams wrote:
| > > Someone please tell me why I cannot find a CASE statement in the Python
| > > documentation index...
| >
| > Because there isn't one.
| >
| > Use if/elif/else instead.
| >
| > It doesn't sting as much as you might expect.
|
| Oh but it does ;-)
Why does it? CASE is little more than a special if-else ladder for
integral types only. If you are simply trying to get a value, use a
dictionary lookup instead.
-D
More information about the Python-list
mailing list