Simple, elegant, pythonic solution for switch statement
bruno modulix
onurb at xiludom.gro
Tue Apr 26 05:37:24 EDT 2005
python_only wrote:
> Check it out!
>
> Readable switch construction without lambdas or dictionaries:
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410692
>
Not sure I'll have a need for it, but, yes, nice job !-)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list
mailing list