diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2018-10-13 22:06:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-13 22:06:55 +0200 |
commit | 05111636cff6ca9e1777480ff894e85afd63fdd3 (patch) | |
tree | 1c69121b80521be7b08d800c7cc1eef32ff9c216 | |
parent | fa5ad9973965845ccf1094a872763f973aa0eabc (diff) | |
parent | 73b3f207701a874ff0a2dc09b19ce8109297c9a0 (diff) | |
download | cython-05111636cff6ca9e1777480ff894e85afd63fdd3.tar.gz |
Merge pull request #2637 from bjodah/cmdline-opt-3str
Add --3str command line option to 'cython' program
-rw-r--r-- | Cython/Compiler/CmdLine.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Cython/Compiler/CmdLine.py b/Cython/Compiler/CmdLine.py index ee71f235b..e89e45ab4 100644 --- a/Cython/Compiler/CmdLine.py +++ b/Cython/Compiler/CmdLine.py @@ -40,6 +40,8 @@ Options: --embed[=<method_name>] Generate a main() function that embeds the Python interpreter. -2 Compile based on Python-2 syntax and code semantics. -3 Compile based on Python-3 syntax and code semantics. + --3str Compile based on Python-3 syntax and code semantics without + assuming unicode by default for string literals under Python 2. --lenient Change some compile time errors to runtime errors to improve Python compatibility --capi-reexport-cincludes Add cincluded headers to any auto-generated header files. @@ -151,6 +153,8 @@ def parse_command_line(args): options.language_level = 2 elif option == '-3': options.language_level = 3 + elif option == '--3str': + options.language_level = '3str' elif option == "--capi-reexport-cincludes": options.capi_reexport_cincludes = True elif option == "--fast-fail": |