mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Remove "print >>obj" exception hint for Python 2 (#122853)
This commit is contained in:
parent
6aa35f3002
commit
9375b9ca3a
2 changed files with 0 additions and 46 deletions
|
@ -1000,20 +1000,6 @@ binary_op(PyObject *v, PyObject *w, const int op_slot, const char *op_name)
|
|||
PyObject *result = BINARY_OP1(v, w, op_slot, op_name);
|
||||
if (result == Py_NotImplemented) {
|
||||
Py_DECREF(result);
|
||||
|
||||
if (op_slot == NB_SLOT(nb_rshift) &&
|
||||
PyCFunction_CheckExact(v) &&
|
||||
strcmp(((PyCFunctionObject *)v)->m_ml->ml_name, "print") == 0)
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"unsupported operand type(s) for %.100s: "
|
||||
"'%.100s' and '%.100s'. Did you mean \"print(<message>, "
|
||||
"file=<output_stream>)\"?",
|
||||
op_name,
|
||||
Py_TYPE(v)->tp_name,
|
||||
Py_TYPE(w)->tp_name);
|
||||
return NULL;
|
||||
}
|
||||
return binop_type_error(v, w, op_name);
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue