mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
Make sure that -t and -tt also work on strings passed to compile().
This commit is contained in:
parent
b55f9ff68c
commit
89ce454498
1 changed files with 7 additions and 0 deletions
|
@ -68,6 +68,13 @@ PyParser_ParseString(s, g, start, err_ret)
|
||||||
return NULL;
|
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);
|
return parsetok(tok, g, start, err_ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue