Commit 3ad05763 authored by Raymond Hettinger's avatar Raymond Hettinger

Strengthen the guard. The code doesn't work well with subclasses.

parent f17ab89c
......@@ -8547,7 +8547,7 @@ unicode_maketrans(PyUnicodeObject *null, PyObject *args)
}
} else {
/* x must be a dict */
if (!PyDict_Check(x)) {
if (!PyDict_CheckExact(x)) {
PyErr_SetString(PyExc_TypeError, "if you give only one argument "
"to maketrans it must be a dict");
goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment