mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
Make Py3k warnings consistent w.r.t. punctuation; also respect the
EOL 80 limit and supply more alternatives in warning messages.
This commit is contained in:
parent
80055f6295
commit
d5b635f196
16 changed files with 67 additions and 54 deletions
|
@ -338,9 +338,12 @@ code_richcompare(PyObject *self, PyObject *other, int op)
|
|||
!PyCode_Check(self) ||
|
||||
!PyCode_Check(other)) {
|
||||
|
||||
/* Py3K warning if types are not equal and comparison isn't == or != */
|
||||
if (Py_Py3kWarningFlag && PyErr_Warn(PyExc_DeprecationWarning,
|
||||
"code inequality comparisons not supported in 3.x.") < 0) {
|
||||
/* Py3K warning if types are not equal and comparison
|
||||
isn't == or != */
|
||||
if (Py_Py3kWarningFlag &&
|
||||
PyErr_Warn(PyExc_DeprecationWarning,
|
||||
"code inequality comparisons not supported "
|
||||
"in 3.x") < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue