diff options
author | Georg Brandl <georg@python.org> | 2008-03-25 08:29:14 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-03-25 08:29:14 (GMT) |
commit | d5b635f1969fdd609f0aff5669c9ec30e61be62e (patch) | |
tree | 1c854f8108e2b22d8c5ba4d529b6d99cd9f5f244 /Objects/methodobject.c | |
parent | 80055f6295dd48274ae68d13806c7ee3c5b5882f (diff) | |
download | cpython-d5b635f1969fdd609f0aff5669c9ec30e61be62e.zip cpython-d5b635f1969fdd609f0aff5669c9ec30e61be62e.tar.gz cpython-d5b635f1969fdd609f0aff5669c9ec30e61be62e.tar.bz2 |
Make Py3k warnings consistent w.r.t. punctuation; also respect the
EOL 80 limit and supply more alternatives in warning messages.
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r-- | Objects/methodobject.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 16175f9..e641df1 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -235,9 +235,10 @@ meth_richcompare(PyObject *self, PyObject *other, int op) !PyCFunction_Check(other)) { /* Py3K warning if types are not equal and comparison isn't == or != */ - if (Py_Py3kWarningFlag && PyErr_Warn(PyExc_DeprecationWarning, - "builtin_function_or_method " - "inequality comparisons not supported in 3.x.") < 0) { + if (Py_Py3kWarningFlag && + PyErr_Warn(PyExc_DeprecationWarning, + "builtin_function_or_method inequality " + "comparisons not supported in 3.x") < 0) { return NULL; } @@ -353,12 +354,10 @@ Py_FindMethodInChain(PyMethodChain *chain, PyObject *self, const char *name) { if (name[0] == '_' && name[1] == '_') { if (strcmp(name, "__methods__") == 0) { - if (Py_Py3kWarningFlag) { - if (PyErr_Warn(PyExc_DeprecationWarning, - "__methods__ not supported " - "in 3.x") < 0) - return NULL; - } + if (Py_Py3kWarningFlag && + PyErr_Warn(PyExc_DeprecationWarning, + "__methods__ not supported in 3.x") < 0) + return NULL; return listmethodchain(chain); } if (strcmp(name, "__doc__") == 0) { |