[Python-ideas] Yet Another Switch-Case Syntax Proposal

Philipp A. flying-sheep at web.de
Sat Apr 26 19:44:23 CEST 2014


2014-04-26 17:07 GMT+02:00 Stephen J. Turnbull <stephen at xemacs.org>:

> The reason why people keep coming back to a series of comparisons
> (actually more general: a series of branch on tests) is that a series
> of comparisons is behaviorally equivalent to a switch.  Written in
> appropriate style it's obvious that it is intended to have the effect
> of a switch.  The code implementing a case is given "naturally" after
> mentioning the case.  Given all that, it seems unnecessary to add new
> syntax.
>
> Starting from that summary of the thread, what are you trying to
> argue?
>

only that all the discussion about series of comparisons don’t paint the
full picture; that the Case class isn’t enough.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140426/d143fc4e/attachment.html>


More information about the Python-ideas mailing list