From e8d4299fa4f5da3bd0732dabf58bfc69bbaf0d9b Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 16 Dec 2010 23:24:42 +0100 Subject: [PATCH] fix compile crash --- Cython/Compiler/Code.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py index 5134dcf2..47ca0e58 100644 --- a/Cython/Compiler/Code.py +++ b/Cython/Compiler/Code.py @@ -6,7 +6,7 @@ import cython cython.declare(re=object, Naming=object, Options=object, StringEncoding=object, Utils=object, SourceDescriptor=object, StringIOTree=object, - DebugFlags=object, none_or_sub=object) + DebugFlags=object, none_or_sub=object, basestring=object) import re import Naming @@ -19,9 +19,9 @@ import DebugFlags from Cython.Utils import none_or_sub try: - basestring -except NameError: - basestring = str + from __builtin__ import basestring +except ImportError: + from builtins import str as basestring class UtilityCode(object): # Stores utility code to add during code generation. -- 2.26.2