![](https://secure.gravatar.com/avatar/334b870d5b26878a79b2dc4cfcc500bc.jpg?s=120&d=mm&r=g)
Nikolaus Rath writes:
Or maybe:
if <thing> ... matches <matcher>: pass matches <matcher>: pass
Where "..." is an actual syntactic element that replaces the ":" in a regular if.
Interesting, but I don't like it because (1) ":" is *the* compound syntax indicator in Python, (2) "..." looks like somebody forgot to fill in a blank, *and it should* look that way, (3) "matches" is too close to "match" (which is a stdlib identifier), and it's an identifier I have used, and (4) it's an additional keyword. Leaving aside the spelling quibbles, following "if" I would "see" "matches" as an operator, and want to write if <thing> matches <matcher>: pass elif <thing> matches <matcher>: pass and I'm back in "if ... elif ... else ..." land. I don't really see much advantage to your particular spelling, as to me it doesn't have the connotation that Paul requires (correctly, IMHO) of a single "subject" tested against multiple "predicates". It just "looks wrong" to me. IMHO, YMMV, etc. It *is* interesting, I am trying to contribute to discussion, not end it. My mind could be updated. :-)