diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-04-27 03:01:45 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-04-27 03:01:45 (GMT) |
commit | 9f4f48114fbf2df3803a44a30cd14e11679403fe (patch) | |
tree | 701fc350aa3a6ebf282fdb92e891c793f65db0fb /Objects/dictobject.c | |
parent | a692c4df63a41c42f2ce10a4521136d1440a712d (diff) | |
download | cpython-9f4f48114fbf2df3803a44a30cd14e11679403fe.zip cpython-9f4f48114fbf2df3803a44a30cd14e11679403fe.tar.gz cpython-9f4f48114fbf2df3803a44a30cd14e11679403fe.tar.bz2 |
Use PyErr_WarnPy3k throughout
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index d552098..2291524 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1778,10 +1778,8 @@ dict_richcompare(PyObject *v, PyObject *w, int op) } else { /* Py3K warning if comparison isn't == or != */ - if (Py_Py3kWarningFlag && - PyErr_Warn(PyExc_DeprecationWarning, - "dict inequality comparisons not supported " - "in 3.x") < 0) { + if (PyErr_WarnPy3k("dict inequality comparisons not supported " + "in 3.x", 1) < 0) { return NULL; } res = Py_NotImplemented; @@ -1811,10 +1809,8 @@ dict_contains(register PyDictObject *mp, PyObject *key) static PyObject * dict_has_key(register PyDictObject *mp, PyObject *key) { - if (Py_Py3kWarningFlag && - PyErr_Warn(PyExc_DeprecationWarning, - "dict.has_key() not supported in 3.x; " - "use the in operator") < 0) + if (PyErr_WarnPy3k("dict.has_key() not supported in 3.x; " + "use the in operator", 1) < 0) return NULL; return dict_contains(mp, key); } |