summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-12-14 16:28:26 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2009-12-14 16:28:26 (GMT)
commit0a0a1a842c02c87fcb052dec226f591cfe6f988f (patch)
tree9b656f294913ab834fed62433fbc0b4dadcb42c7 /Objects/unicodeobject.c
parent96228739c5a66cb7c5ab82e1e1d179b642e405cb (diff)
downloadcpython-0a0a1a842c02c87fcb052dec226f591cfe6f988f.zip
cpython-0a0a1a842c02c87fcb052dec226f591cfe6f988f.tar.gz
cpython-0a0a1a842c02c87fcb052dec226f591cfe6f988f.tar.bz2
Issue #1680159: unicode coercion during an 'in' operation was masking
any errors that might occur during coercion of the left operand and turning them into a TypeError with a message text that was confusing in the given context. This patch lets any errors through, as was already done during coercion of the right hand side.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index e85b20f..79e824e 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -6502,8 +6502,6 @@ int PyUnicode_Contains(PyObject *container,
/* Coerce the two arguments */
sub = PyUnicode_FromObject(element);
if (!sub) {
- PyErr_SetString(PyExc_TypeError,
- "'in <string>' requires string as left operand");
return -1;
}