[Patches] [ python-Patches-1504199 ] Switch syntax (partial PEP 275)
SourceForge.net
noreply at sourceforge.net
Sun Jun 11 04:13:12 CEST 2006
Patches item #1504199, was opened at 2006-06-11 12:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1504199&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Lee (krumms)
Assigned to: Nobody/Anonymous (nobody)
Summary: Switch syntax (partial PEP 275)
Initial Comment:
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1504199&group_id=5470
More information about the Patches
mailing list