summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-05-29 22:11:22 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-05-29 22:11:22 (GMT)
commit3ad05763a6d69a93e58dfef6cc9d84f14edbb29b (patch)
treef04a626a1f296128c37b859e58db5f20bc735ee6 /Objects
parentf17ab89c7732c91679cc5e3d85497c4071d7781c (diff)
downloadcpython-3ad05763a6d69a93e58dfef6cc9d84f14edbb29b.zip
cpython-3ad05763a6d69a93e58dfef6cc9d84f14edbb29b.tar.gz
cpython-3ad05763a6d69a93e58dfef6cc9d84f14edbb29b.tar.bz2
Strengthen the guard. The code doesn't work well with subclasses.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 47e0933..7cc7037 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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;