From 8688b1e00090ba11f29ba66d6da8212bc352e987 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 16 Aug 2008 13:42:13 +0200 Subject: [PATCH] cleanup --- Cython/Compiler/Parsing.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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" -- 2.26.2