From 89ce4544988bcfd3535c11f1f8d1d55aea69a81f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 21 Dec 1998 18:32:40 +0000 Subject: [PATCH] Make sure that -t and -tt also work on strings passed to compile(). --- Parser/parsetok.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 6453b6afe55..5b0d99050fc 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); }