diff options
| author | Benjamin Peterson <benjamin@python.org> | 2008-04-27 18:40:21 +0000 |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2008-04-27 18:40:21 +0000 |
| commit | f19a7b90bd0cbdf40d02f125db3e39f077f3a89f (patch) | |
| tree | c5ec7d4eb8e528e91715cccab39590324ca0327c /Objects/methodobject.c | |
| parent | fe4948bcefe247ca69e3d605eac1d9d4985e4cfd (diff) | |
| download | cpython-git-f19a7b90bd0cbdf40d02f125db3e39f077f3a89f.tar.gz | |
A little reformating of Py3k warnings
Diffstat (limited to 'Objects/methodobject.c')
| -rw-r--r-- | Objects/methodobject.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 240cc05d46..737a3f780e 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -236,7 +236,7 @@ meth_richcompare(PyObject *self, PyObject *other, int op) { /* Py3K warning if types are not equal and comparison isn't == or != */ if (PyErr_WarnPy3k("builtin_function_or_method inequality " - "comparisons not supported in 3.x", 1) < 0) { + "comparisons not supported in 3.x", 1) < 0) { return NULL; } @@ -352,9 +352,8 @@ Py_FindMethodInChain(PyMethodChain *chain, PyObject *self, const char *name) { if (name[0] == '_' && name[1] == '_') { if (strcmp(name, "__methods__") == 0) { - if (Py_Py3kWarningFlag && - PyErr_Warn(PyExc_DeprecationWarning, - "__methods__ not supported in 3.x") < 0) + if (PyErr_WarnPy3k("__methods__ not supported in 3.x", + 1) < 0) return NULL; return listmethodchain(chain); } |
