mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
bpo-42128: Structural Pattern Matching (PEP 634) (GH-22917)
Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Talin <viridia@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
This commit is contained in:
parent
cc02b4f2e8
commit
145bf269df
43 changed files with 10867 additions and 2607 deletions
|
@ -359,6 +359,11 @@ given type object has a specified feature.
|
|||
#define Py_TPFLAGS_HAVE_AM_SEND (1UL << 21)
|
||||
#endif
|
||||
|
||||
// This undocumented flag gives certain built-ins their unique pattern-matching
|
||||
// behavior, which allows a single positional subpattern to match against the
|
||||
// subject itself (rather than a mapped attribute on it):
|
||||
#define _Py_TPFLAGS_MATCH_SELF (1UL << 22)
|
||||
|
||||
/* These flags are used to determine if a type is a subclass. */
|
||||
#define Py_TPFLAGS_LONG_SUBCLASS (1UL << 24)
|
||||
#define Py_TPFLAGS_LIST_SUBCLASS (1UL << 25)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue