Publisher review:Readable switch construction script duplicates C's original 'switch' functionality and structure with reasonable accuracy. Python's lack of a 'switch' statement has garnered much discussion and even a PEP.
The most popular substitute uses dictionaries to map cases to functions, which requires lots of defs or lambdas. While the approach shown in this script may be O(n) for cases, it aims to duplicate C's original 'switch' functionality and structure with reasonable accuracy.
Readable switch construction 1.7 is a Python script for Programming Methods and Algorithms scripts design by Brian Beck.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
duplicates C's original 'switch' functionality and structure with reasonable accuracy.
Operating system:Windows / Linux / Mac OS / BSD / Solaris