From 4d98733ebb02aab664e6e6f2cbfc962717b68a8c Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 16 Dec 2010 20:11:29 +0100 Subject: [PATCH] provide 'builtins' builtin module in -3 mode --- Cython/Compiler/Main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index 3088db34..dd65657a 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -70,7 +70,6 @@ class Context(object): # language_level int currently 2 or 3 for Python 2/3 def __init__(self, include_directories, compiler_directives, cpp=False, language_level=2): - #self.modules = {"__builtin__" : BuiltinScope()} import Builtin, CythonScope self.modules = {"__builtin__" : Builtin.builtin_scope} self.modules["cython"] = CythonScope.create_cython_scope(self) @@ -95,6 +94,7 @@ class Context(object): from Future import print_function, unicode_literals self.future_directives.add(print_function) self.future_directives.add(unicode_literals) + self.modules['builtins'] = self.modules['__builtin__'] def create_pipeline(self, pxd, py=False): from Visitor import PrintTree -- 2.26.2