This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients meador.inge, ncoghlan, techtonik, vstinner
Date 2012-11-28.01:32:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354066325.19.0.165264081541.issue16566@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, if you pass "string" when you meant to pass ["string"], you will often get awful error messages.

This is one of the downsides of strings being iterable, but we're not going to add "if isinstance(obj, str): throw TypeError(msg)" special cases everywhere to address it.

It's definitely a wart in Python, but it's one Python developers just have to get used to (and learn to suspect whenever they see a single-character string in an error message).
History
Date User Action Args
2012-11-28 01:32:05ncoghlansetrecipients: + ncoghlan, vstinner, techtonik, meador.inge
2012-11-28 01:32:05ncoghlansetmessageid: <1354066325.19.0.165264081541.issue16566@psf.upfronthosting.co.za>
2012-11-28 01:32:04ncoghlanlinkissue16566 messages
2012-11-28 01:32:03ncoghlancreate