From 2ec3d7053eb821aeefba705b269fc98c22849421 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 7 Nov 2010 22:05:22 +0100 Subject: [PATCH] removed (hopefully) dead code --- Cython/Compiler/PyrexTypes.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index 6a17c06d..77d96f84 100755 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -379,14 +379,8 @@ class BuiltinObjectType(PyObjectType): base_type = None module_name = '__builtin__' - alternative_name = None # used for str/bytes duality - def __init__(self, name, cname): self.name = name - if name == 'str': - self.alternative_name = 'bytes' - elif name == 'bytes': - self.alternative_name = 'str' self.cname = cname self.typeptr_cname = "&" + cname @@ -403,9 +397,7 @@ class BuiltinObjectType(PyObjectType): def assignable_from(self, src_type): if isinstance(src_type, BuiltinObjectType): - return src_type.name == self.name or ( - src_type.name == self.alternative_name and - src_type.name is not None) + return src_type.name == self.name elif src_type.is_extension_type: return (src_type.module_name == '__builtin__' and src_type.name == self.name) -- 2.26.2