Clean up the Py3k warnings for non-BaseException-subclasses a bit. We

now don't warn for some corner cases that deserve a warning, rather
than warning double or incorrectly for some other corner cases.
This commit is contained in:
Guido van Rossum 2008-03-18 03:15:05 +00:00
parent 04edb528ca
commit 20bda581e3
1 changed files with 6 additions and 4 deletions

View File

@ -4086,7 +4086,8 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w)
if (ret_val == -1)
return NULL;
}
if (Py_Py3kWarningFlag &&
else if (Py_Py3kWarningFlag &&
!PyTuple_Check(exc) &&
!Py3kExceptionClass_Check(exc))
{
int ret_val;
@ -4108,7 +4109,8 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w)
if (ret_val == -1)
return NULL;
}
if (Py_Py3kWarningFlag &&
else if (Py_Py3kWarningFlag &&
!PyTuple_Check(w) &&
!Py3kExceptionClass_Check(w))
{
int ret_val;