Commit Graph

6 Commits

Author SHA1 Message Date
Mark Shannon 54a16d60ef
Don't special case named tuples. The default behavior is fine. (#1874) 2021-03-16 11:15:21 +00:00
Mark Shannon 3cc86339d2
PEP 653: Change semantics to be closer to PEP 634, while keeping the important features of PEP 653. (#1868)
* Change name of `MATCH_CLASS` to `MATCH_POSITIONAL`.
* Drop `__attributes__` and use `__match_args__` instead.
  * For `MATCH_DEFAULT`, `__match_args__` acts a map from positions to names.
   * For `MATCH_POSITIONAL`, `__match_args__` acts a map from names to positions.
* Change semantics of `MATCH_DEFAULT` when match class patterns to those of PEP 634.
* Update translations.
* Further expand examples
2021-03-12 18:01:08 +00:00
Mark Shannon 2aec45c8b8
PEP 653: Rephrase translations in terms of failure, rather than success, to make them easier to compose. (#1865) 2021-03-10 15:22:07 +00:00
Mark Shannon c8f7f9cd7c
PEP 653: Make it clearer that MATCH_DEFAULT is the default. (#1823) 2021-02-19 18:55:47 +00:00
Mark Shannon 89183f61d1
Clarify description of __match_kind__. Drop claims of improved security (#1822) 2021-02-19 17:56:52 +00:00
Mark Shannon aeab09a58f
PEP 653: Precise Semantics for Pattern Matching (#1819) 2021-02-18 15:08:53 +00:00