cleanup
authorStefan Behnel <scoder@users.berlios.de>
Sat, 16 Aug 2008 11:42:13 +0000 (13:42 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 16 Aug 2008 11:42:13 +0000 (13:42 +0200)
Cython/Compiler/Parsing.py

index 5d3009a633ec015c49079c696d3879c04363552d..1c9005a2275ce274e7899bf592f29c66117ae9c0 100644 (file)
@@ -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"