[Python-checkins] r73035 - python/branches/py3k/Objects/unicodeobject.c

raymond.hettinger python-checkins at python.org
Sat May 30 00:11:22 CEST 2009


Author: raymond.hettinger
Date: Sat May 30 00:11:22 2009
New Revision: 73035
Log:
Strengthen the guard. The code doesn't work well with subclasses.
Modified:
 python/branches/py3k/Objects/unicodeobject.c
Modified: python/branches/py3k/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k/Objects/unicodeobject.c	(original)
+++ python/branches/py3k/Objects/unicodeobject.c	Sat May 30 00:11:22 2009
@@ -8547,7 +8547,7 @@
 }
 } 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;


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /