Commit Graph

34 Commits

Author SHA1 Message Date
Talin b893d2e02b
PEP 622: Change 'target' to 'subject' (#1498) 2020-07-05 21:29:52 -07:00
JimJJewett 058b126e7b
PEP 622: Sync explanation example; case 0 is now first (#1495) 2020-07-04 14:04:43 -07:00
Daniel F Moisset 60a15e8332
PEP 622: make the binding semantics explicit (#1490) 2020-07-02 16:11:05 -07:00
Daniel F Moisset 127fc3701e
PEP 622: Add exception semantics (#1491) 2020-07-02 14:47:45 -07:00
Guido van Rossum 2bedd36c45
PEP 622: Add argumentation against 'else' (#1489) 2020-07-01 22:46:42 -07:00
Guido van Rossum 045450aaf4
PEP 622: Strengthen the argument for _ as wildcard (#1488)
See https://github.com/gvanrossum/patma/issues/93#issuecomment-650723402

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2020-07-01 22:32:42 -07:00
Guido van Rossum 4b7f1fcd4c
PEP 622: Write up why we reject alternative spellings of OR patterns (#1487)
Much of this was cribbed from https://github.com/gvanrossum/patma/issues/93
2020-07-01 22:11:53 -07:00
Brandt Bucher 74c81defd0
PEP 622: Drop __match__ from the spec (#1484) 2020-07-01 08:37:47 -07:00
Talin 31d5ffe9ca
PEP 622: Re-wrote deferred ideas section (#1483)
The section that explains the decision to defer an extended
custom matching protocol has been transformed into a section
that defers custom matching altogether.
2020-07-01 07:57:00 -07:00
Guido van Rossum 2e8df86101
PEP 622: Rename 'named sub-pattern' to 'walrus pattern' (#1482) 2020-06-30 20:26:10 -07:00
Guido van Rossum d3bcd15cd2
PEP 622: Rename name pattern to capture pattern (#1479)
Also make the section headings describing various types of patterns plural, e.g. "Capture patterns".
2020-06-29 12:11:20 -07:00
Brandt Bucher 5aec654f9e
PEP 622: Drop ImpossibleMatchError (#1480) 2020-06-29 11:54:42 -07:00
Guido van Rossum d95ec4b557
Change definition of __match__ (#1477)
It should never raise if an attribute is missing.

Also fix one last mention of the exception for a single positional argument.

See https://github.com/gvanrossum/patma/issues/111#issuecomment-650874268
2020-06-29 09:32:21 -07:00
Guido van Rossum 430718e6a5 Fix link to deferred idea for __match__ 2020-06-28 20:30:08 -07:00
Brandt Bucher 0146bb56f9
PEP 622: Remove type and complex from special cases (#1475) 2020-06-27 12:22:24 -07:00
Taine Zhao 4b5513942c
PEP 622: Change claim about Haskell (#1473)
fixes gvanrossum/patma#107
2020-06-27 12:05:22 -07:00
Brandt Bucher a106177241
PEP 622: Updates from Python-Dev (#1472)
In particular __match_args__ is simplified and the default processing only applies to certain built-in types.
2020-06-26 17:55:59 -07:00
Brandt Bucher a973470384
PEP 622: Update Appendix A Grammar (#1466) 2020-06-25 20:52:27 -07:00
Guido van Rossum fa90054ead Mention flat indentation 'match: expression' 2020-06-24 21:26:17 -07:00
Guido van Rossum 770d36cc01 PEP 622: Clarify even more strongly that True/False/None are keywords 2020-06-24 18:20:19 -07:00
Guido van Rossum a39035a22e PEP 622: Don't use "ADT" for "algebraic data types"
ADT already means Abstract Data Types (a different concept).
2020-06-24 18:18:00 -07:00
Guido van Rossum 33788eb974 PEP 622: Explain why * and ... don't make good wildcards
(And hint that ? is a little better but still worse than _.)
2020-06-24 17:39:22 -07:00
Guido van Rossum 8f43d3ef64 PEP 622: Clarify the status of True, False and None as literals 2020-06-24 17:39:14 -07:00
Guido van Rossum 1560745bdc PEP 622: Show Point(x=1, y=2) in class pattern section 2020-06-24 17:39:04 -07:00
Miroslav Šedivý a4a3b8f1dc
PEP 622: Fix Typos (#1457) 2020-06-24 17:25:13 -07:00
Guido van Rossum 410ba6dd48 PEP 622: drop restriction on ._ an _.a 2020-06-24 07:46:54 -07:00
Swastik Baranwal 5d2dc3fb23
PEP 622: fix typo (#1460) 2020-06-23 22:15:47 -07:00
Guido van Rossum 8fd28e1e94 PEP 622: Clarifications that came up on python-dev
- State that `case` is also a soft keyword
- Triple-quoted strings are supported
- Clarify that `__match__` must be a static or class method returning an object or None
- Add two TODOs
- Fix line of dashes
2020-06-23 17:36:54 -07:00
Ethan Furman 9a895d7dce
PEP 622: minor word additions/changes (#1453) 2020-06-23 15:20:24 -07:00
Jürgen Gmach 64b943aaf4
Fix typo (#1456) 2020-06-23 12:38:21 -07:00
Jürgen Gmach d2491d3c2d
Fix typo (#1454) 2020-06-23 12:38:03 -07:00
Jürgen Gmach 070bee535f
Fix typo (#1455) 2020-06-24 05:21:43 +10:00
Oliver Bestwalter 29ddc84b4d
PEP 622: minor typo and grammar fixes (#1452)
M
2020-06-23 11:03:40 -07:00
Guido van Rossum 771b2a8db0
PEP 622: Structural Pattern Matching (Bucher, Kohn, Levkivskyi, GvR, Talin) (#1451) 2020-06-23 08:27:36 -07:00