Ensure that code object names (co_name) are unicode.

Verify that they print properly too.
This commit is contained in:
Neal Norwitz 2007-08-24 23:12:06 +00:00
parent a5d16a3f85
commit 41103bf6f2
2 changed files with 11 additions and 6 deletions

View file

@ -2991,7 +2991,7 @@ compiler_dictcomp(struct compiler *c, expr_ty e)
{
static identifier name;
if (!name) {
name = PyString_FromString("<dictcomp>");
name = PyUnicode_FromString("<dictcomp>");
if (!name)
return 0;
}