diff options
author | Mark Shannon <mark@hotpy.org> | 2021-04-30 08:50:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 08:50:28 (GMT) |
commit | 069e81ab3da46c441335ca762c4333b7bd91861d (patch) | |
tree | 02716907f4513a812cf2c72309cc4e6f133b3ab3 /Objects/tupleobject.c | |
parent | 2abbd8f2add5e80b86a965625b9a77ae94a101cd (diff) | |
download | cpython-069e81ab3da46c441335ca762c4333b7bd91861d.zip cpython-069e81ab3da46c441335ca762c4333b7bd91861d.tar.gz cpython-069e81ab3da46c441335ca762c4333b7bd91861d.tar.bz2 |
bpo-43977: Use tp_flags for collection matching (GH-25723)
* Add Py_TPFLAGS_SEQUENCE and Py_TPFLAGS_MAPPING, add to all relevant standard builtin classes.
* Set relevant flags on collections.abc.Sequence and Mapping.
* Use flags in MATCH_SEQUENCE and MATCH_MAPPING opcodes.
* Inherit Py_TPFLAGS_SEQUENCE and Py_TPFLAGS_MAPPING.
* Add NEWS
* Remove interpreter-state map_abc and seq_abc fields.
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r-- | Objects/tupleobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 89c393c..6b1ab74 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -918,7 +918,7 @@ PyTypeObject PyTuple_Type = { 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_TUPLE_SUBCLASS | - _Py_TPFLAGS_MATCH_SELF, /* tp_flags */ + _Py_TPFLAGS_MATCH_SELF | Py_TPFLAGS_SEQUENCE, /* tp_flags */ tuple_new__doc__, /* tp_doc */ (traverseproc)tupletraverse, /* tp_traverse */ 0, /* tp_clear */ |