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.
This commit is contained in:
Christian Heimes 2008-03-26 22:01:37 +00:00
parent 0cb3e86c47
commit 3c60833e1e
12 changed files with 107 additions and 33 deletions

View file

@ -8,7 +8,8 @@ extern "C" {
#endif
#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \
CO_FUTURE_WITH_STATEMENT|CO_FUTURE_PRINT_FUNCTION)
CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \
CO_FUTURE_UNICODE_LITERALS)
#define PyCF_MASK_OBSOLETE (CO_NESTED)
#define PyCF_SOURCE_IS_UTF8 0x0100
#define PyCF_DONT_IMPLY_DEDENT 0x0200