From: Stefan Behnel Date: Thu, 15 May 2008 09:14:12 +0000 (+0200) Subject: cleanup and provisionary Py3 fix X-Git-Tag: 0.9.8rc1~37^2~57 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4b25492f2ea9716b8468864945adc50bfaf1d2e0;p=cython.git cleanup and provisionary Py3 fix --- diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 803879ee..49019fcb 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -502,13 +502,8 @@ def p_name(s, name): return ExprNodes.LongNode(pos, value = rep) elif isinstance(value, float): return ExprNodes.FloatNode(pos, value = rep) - elif isinstance(value, str): - sval = Utils.EncodedString(rep[1:-1]) - sval.encoding = value.encoding - return ExprNodes.StringNode(pos, value = sval) elif isinstance(value, unicode): - sval = Utils.EncodedString(rep[2:-1]) - return ExprNodes.StringNode(pos, value = sval) + return ExprNodes.StringNode(pos, value = value) else: error(pos, "Invalid type for compile-time constant: %s" % value.__class__.__name__)