diff options
Diffstat (limited to 'Objects/cellobject.c')
-rw-r--r-- | Objects/cellobject.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/cellobject.c b/Objects/cellobject.c index b72d43be67..37cde41da1 100644 --- a/Objects/cellobject.c +++ b/Objects/cellobject.c @@ -54,6 +54,12 @@ cell_dealloc(PyCellObject *op) static int cell_compare(PyCellObject *a, PyCellObject *b) { + /* Py3K warning for comparisons */ + if (Py_Py3kWarningFlag && PyErr_Warn(PyExc_DeprecationWarning, + "cell comparisons not supported in 3.x.") < 0) { + return NULL; + } + if (a->ob_ref == NULL) { if (b->ob_ref == NULL) return 0; |