diff options
author | Guido van Rossum <guido@python.org> | 1998-12-21 18:32:40 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-12-21 18:32:40 (GMT) |
commit | 89ce4544988bcfd3535c11f1f8d1d55aea69a81f (patch) | |
tree | 21d3ac79bb4e5d7ae5afbe7dd4ac475b2c1c63d6 | |
parent | b55f9ff68c561478af056aa13d89f446ff4193f7 (diff) | |
download | cpython-89ce4544988bcfd3535c11f1f8d1d55aea69a81f.zip cpython-89ce4544988bcfd3535c11f1f8d1d55aea69a81f.tar.gz cpython-89ce4544988bcfd3535c11f1f8d1d55aea69a81f.tar.bz2 |
Make sure that -t and -tt also work on strings passed to compile().
-rw-r--r-- | Parser/parsetok.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 6453b6a..5b0d990 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 = "<string>"; + tok->altwarning = (tok->filename != NULL); + if (Py_TabcheckFlag >= 2) + tok->alterror++; + } + return parsetok(tok, g, start, err_ret); } |