From: Guido van Rossum Date: Mon, 21 Dec 1998 18:32:40 +0000 (+0000) Subject: Make sure that -t and -tt also work on strings passed to compile(). X-Git-Tag: v1.5.2b1~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89ce4544988bcfd3535c11f1f8d1d55aea69a81f;p=python Make sure that -t and -tt also work on strings passed to compile(). --- diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 6453b6afe5..5b0d99050f 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@ -68,6 +68,13 @@ PyParser_ParseString(s, g, start, err_ret) return NULL; } + if (Py_TabcheckFlag || Py_VerboseFlag) { + tok->filename = ""; + tok->altwarning = (tok->filename != NULL); + if (Py_TabcheckFlag >= 2) + tok->alterror++; + } + return parsetok(tok, g, start, err_ret); }