diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2010-05-04 03:21:51 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2010-05-04 03:21:51 (GMT) |
commit | 268e4872d3d16ef0457487e401e253d37748c136 (patch) | |
tree | 15b89fbc8aef45894eac7895d3834904ee5b3d73 /Objects/dictobject.c | |
parent | 04b99cc68dca7f1b97a09cf1d3a741e48ccea5e4 (diff) | |
download | cpython-268e4872d3d16ef0457487e401e253d37748c136.zip cpython-268e4872d3d16ef0457487e401e253d37748c136.tar.gz cpython-268e4872d3d16ef0457487e401e253d37748c136.tar.bz2 |
Issue #8404: Fix set operations on dictionary views.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index be25176..2ab1520 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -3000,13 +3000,14 @@ static PyNumberMethods dictviews_as_number = { 0, /*nb_add*/ (binaryfunc)dictviews_sub, /*nb_subtract*/ 0, /*nb_multiply*/ + 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ - 0, /*nb_bool*/ + 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ @@ -3040,7 +3041,8 @@ PyTypeObject PyDictKeys_Type = { PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_CHECKTYPES, /* tp_flags */ 0, /* tp_doc */ (traverseproc)dictview_traverse, /* tp_traverse */ 0, /* tp_clear */ @@ -3124,7 +3126,8 @@ PyTypeObject PyDictItems_Type = { PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_CHECKTYPES, /* tp_flags */ 0, /* tp_doc */ (traverseproc)dictview_traverse, /* tp_traverse */ 0, /* tp_clear */ |