From: Stefan Behnel Date: Sat, 16 Aug 2008 11:42:13 +0000 (+0200) Subject: cleanup X-Git-Tag: 0.9.8.1~13^2~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8688b1e00090ba11f29ba66d6da8212bc352e987;p=cython.git cleanup --- diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 5d3009a6..1c9005a2 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -533,9 +533,7 @@ def p_name(s, name): return ExprNodes.IntNode(pos, value = rep, longness = "L") elif isinstance(value, float): return ExprNodes.FloatNode(pos, value = rep) - elif isinstance(value, unicode): - return ExprNodes.StringNode(pos, value = value) - elif isinstance(value, str): + elif isinstance(value, (str, unicode)): return ExprNodes.StringNode(pos, value = value) else: error(pos, "Invalid type for compile-time constant: %s"