Submit your breaking news stories and original articles to us by contacting us
Python lacks a switch statement. Not really a problem when you can use dictionaries and such, but some people may find it quite disconcerting at first. In any case Simon shows you how he accomplishes the task.
Make sure to read the comments for an interesting discussion on what to do in different situations.
Magnus’s Python Page
Dive Into Python
Darkside Switch Campaign
Tao: How to Switch to the Mac
theKompany Black Adder Python IDE Review
Forever Geek is a resource for all things geek. You can stay tuned by having the latest FG news delivered to you for free via RSS.
Category: Uncategorized
Tags:
Five concept watch designs that make you calculate the time
Steam: Diplomacy of Digital Downloads over Retail Boxes
Best of CES 2010 (Part One): 3DTV, Audio, Display, Processors, Gadgets
A Decade of Zombies IV: Epidemic Rooted in Society
3 Responses for "Switch statements in Python"
March 28th, 2006 at 04:08
1this sux :(
April 19th, 2006 at 14:09
2do you think you could fit in a few more ads on this page?
December 2nd, 2006 at 18:09
3what a stupid page for basic functionality that python lacks.
RSS feed for comments on this post
Leave a reply