Sturla Molden wrote:What advantage does this have over an if-else chain?
I've noticed that PyExt has a switch statement implemented as a context
manager.
with switch(foobar):
if case(1): pass
if case(2): pass
--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/