summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@gmail.com>2021-02-26 22:51:55 (GMT)
committerGitHub <noreply@github.com>2021-02-26 22:51:55 (GMT)
commit145bf269df3530176f6ebeab1324890ef7070bf8 (patch)
tree4c4928d6250785372171a52be0b7269aa444511b /Objects/setobject.c
parentcc02b4f2e810ab524d845daa18bc94df5b092dd8 (diff)
downloadcpython-145bf269df3530176f6ebeab1324890ef7070bf8.zip
cpython-145bf269df3530176f6ebeab1324890ef7070bf8.tar.gz
cpython-145bf269df3530176f6ebeab1324890ef7070bf8.tar.bz2
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>
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index bfe6917..e8912ff 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -2093,7 +2093,8 @@ PyTypeObject PySet_Type = {
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
- Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Py_TPFLAGS_BASETYPE |
+ _Py_TPFLAGS_MATCH_SELF, /* tp_flags */
set_doc, /* tp_doc */
(traverseproc)set_traverse, /* tp_traverse */
(inquiry)set_clear_internal, /* tp_clear */
@@ -2193,7 +2194,8 @@ PyTypeObject PyFrozenSet_Type = {
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
- Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Py_TPFLAGS_BASETYPE |
+ _Py_TPFLAGS_MATCH_SELF, /* tp_flags */
frozenset_doc, /* tp_doc */
(traverseproc)set_traverse, /* tp_traverse */
(inquiry)set_clear_internal, /* tp_clear */
@@ -2504,4 +2506,3 @@ static PyObject _dummy_struct = {
_PyObject_EXTRA_INIT
2, &_PySetDummy_Type
};
-