summaryrefslogtreecommitdiffstats
path: root/Objects/methodobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r--Objects/methodobject.c17
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) {