Make sure that -t and -tt also work on strings passed to compile().

This commit is contained in:
Guido van Rossum 1998-12-21 18:32:40 +00:00
parent b55f9ff68c
commit 89ce454498
1 changed files with 7 additions and 0 deletions

View File

@ -68,6 +68,13 @@ PyParser_ParseString(s, g, start, err_ret)
return NULL;
}
if (Py_TabcheckFlag || Py_VerboseFlag) {
tok->filename = "<string>";
tok->altwarning = (tok->filename != NULL);
if (Py_TabcheckFlag >= 2)
tok->alterror++;
}
return parsetok(tok, g, start, err_ret);
}