"Structural pattern matching" for Python, part 1
"Structural pattern matching" for Python, part 1
Posted Aug 5, 2020 21:00 UTC (Wed) by NYKevin (subscriber, #129325)In reply to: "Structural pattern matching" for Python, part 1 by mb
Parent article: "Structural pattern matching" for Python, part 1
I very much doubt there's a serious use case for "match the left pattern, but then if that pattern match succeeds *and* the thing you're matching against is falsey, throw out the whole match and start over with the right pattern instead" (which is the only other sensible interpretation of logical OR in this context). I also doubt anyone would intuitively interpret it that way, since that's just too ridiculous. So logical OR seems to me like the least-worst option here.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
