Message50458
Attached is a partial implementation of PEP 275.
It should offer a slight performance enhancement over
if/elif/else, although it won't be nearly as fast as a
lookup table generated at compile time (as the PEP
suggests). However, it is more flexible than a
compile-time generated lookup table in that it accepts
expressions - not just constants - for each case clause.
No new opcodes were added.
Cheers,
Tom |
|
| Date |
User |
Action |
Args |
| 2007-08-23 15:52:46 | admin | link | issue1504199 messages |
| 2007-08-23 15:52:46 | admin | create | |
|