mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +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
|
|
@ -5261,6 +5261,10 @@ inherit_special(PyTypeObject *type, PyTypeObject *base)
|
|||
type->tp_flags |= Py_TPFLAGS_LIST_SUBCLASS;
|
||||
else if (PyType_IsSubtype(base, &PyDict_Type))
|
||||
type->tp_flags |= Py_TPFLAGS_DICT_SUBCLASS;
|
||||
|
||||
if (PyType_HasFeature(base, _Py_TPFLAGS_MATCH_SELF)) {
|
||||
type->tp_flags |= _Py_TPFLAGS_MATCH_SELF;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue