diff options
author | Victor Stinner <vstinner@python.org> | 2024-08-12 04:12:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-12 04:12:14 (GMT) |
commit | 9375b9ca3a4998678ba74ff5c77ed540a4dcf887 (patch) | |
tree | 771e3443580e491b86fc31669123e45d61801b74 /Objects | |
parent | 6aa35f3002dda25858d47e702e750e2871e42a7c (diff) | |
download | cpython-9375b9ca3a4998678ba74ff5c77ed540a4dcf887.zip cpython-9375b9ca3a4998678ba74ff5c77ed540a4dcf887.tar.gz cpython-9375b9ca3a4998678ba74ff5c77ed540a4dcf887.tar.bz2 |
Remove "print >>obj" exception hint for Python 2 (#122853)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/abstract.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 8626584..7cca814 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -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; |