^^Python. Match statement. Structure pattern matching.

python/pep-0635/#patterns

 

#literal-patterns

the three singleton patterns:  None, False, True

match by identity (x is y in Python syntax) rather than equality (x==y)

 

Recall that literal patterns are not expressions, but directly denote a specific value.

From a pragmatic point of view,

E.g.  -3+4j  is syntactically an expression of the form

Since expressions are not part of patterns, we had to add explicit syntactic support for such values without having to resort to full expressions.