mirror of
https://github.com/python/cpython.git
synced 2025-11-07 09:02:02 +00:00
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:
parent
0cb3e86c47
commit
3c60833e1e
12 changed files with 107 additions and 33 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue