From e2f68668e411f61bfb2a4c9b9c415a9f51641110 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 5 Jul 2009 21:30:51 +0200 Subject: [PATCH] Py3 fix --- Cython/Compiler/Symtab.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index dbe07054..0c411104 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -15,7 +15,7 @@ from TypeSlots import \ get_special_method_signature, get_property_accessor_signature import ControlFlow import Code -import __builtin__ +import __builtin__ as builtins try: set except NameError: @@ -571,7 +571,7 @@ class BuiltinScope(Scope): self.declare_var(name, type, None, cname) def declare_builtin(self, name, pos): - if not hasattr(__builtin__, name): + if not hasattr(builtins, name): if self.outer_scope is not None: return self.outer_scope.declare_builtin(name, pos) else: @@ -711,7 +711,7 @@ class ModuleScope(Scope): return self def declare_builtin(self, name, pos): - if not hasattr(__builtin__, name): + if not hasattr(builtins, name): if self.has_import_star: entry = self.declare_var(name, py_object_type, pos) return entry -- 2.26.2