summaryrefslogtreecommitdiff
path: root/Objects/rangeobject.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-04-30 09:50:28 +0100
committerGitHub <noreply@github.com>2021-04-30 09:50:28 +0100
commit069e81ab3da46c441335ca762c4333b7bd91861d (patch)
tree02716907f4513a812cf2c72309cc4e6f133b3ab3 /Objects/rangeobject.c
parent2abbd8f2add5e80b86a965625b9a77ae94a101cd (diff)
downloadcpython-git-069e81ab3da46c441335ca762c4333b7bd91861d.tar.gz
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/rangeobject.c')
-rw-r--r--Objects/rangeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 530426c8ac..3e05707b1c 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -735,7 +735,7 @@ PyTypeObject PyRange_Type = {
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_SEQUENCE, /* tp_flags */
range_doc, /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */