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

Terry Reedy tjreedy at udel.edu
Sat Apr 26 22:45:35 CEST 2014


On 4/26/2014 11:07 AM, Stephen J. Turnbull wrote:

> However, it's been mentioned that *if* we're going to have a case
> statement, it would be nice to give it "pattern matching" abilities
> such as the globbing of sh's 'case' or Haskell's signature matching.
> That power might be enough to get some people to swing over to
> supporting a syntax addition, it seems.

In my view, we should only add new syntax if it add substantial 
expressives -- making it easy to say something that is difficult now -- 
and not just be an alternative to if-elif-else. So I am one of 'some 
people'.

-- 
Terry Jan Reedy



More information about the Python-ideas mailing list