diff options
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r-- | Objects/genobject.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c index 14cc46b846..551d9fddc2 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -252,10 +252,7 @@ gen_throw(PyGenObject *gen, PyObject *args) Py_INCREF(typ); } } - - /* Allow raising builtin string exceptions */ - - else if (!PyString_CheckExact(typ)) { + else { /* Not something you can raise. throw() fails. */ PyErr_Format(PyExc_TypeError, "exceptions must be classes, or instances, not %s", |