Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 46118:c78d3586c474 legacy-trunk
Patch #2477: Added from __future__ import unicode_literals
The new PyParser_*Ex() functions are based on Neal's suggestion and initial patch. The new __future__ feature makes all '' and r'' unicode strings. b'' and br'' stay (byte) strings.
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Wed, 26 Mar 2008 22:01:37 +0000 |
| parents | 343597c7d682 |
| children | d00ded8b2677 |
line wrap: on
line diff
--- a/Python/import.c Wed Mar 26 21:41:36 2008 +0000 +++ b/Python/import.c Wed Mar 26 22:01:37 2008 +0000 @@ -818,11 +818,12 @@ { PyCodeObject *co = NULL; mod_ty mod; + PyCompilerFlags flags; PyArena *arena = PyArena_New(); if (arena == NULL) return NULL; - mod = PyParser_ASTFromFile(fp, pathname, Py_file_input, 0, 0, 0, + mod = PyParser_ASTFromFile(fp, pathname, Py_file_input, 0, 0, &flags, NULL, arena); if (mod) { co = PyAST_Compile(mod, pathname, NULL, arena);
