From c2a7ee90c7e5489f7032eca7cf53155fc3d140c5 Mon Sep 17 00:00:00 2001
From: Stefan Behnel <scoder@users.berlios.de>
Date: Sat, 12 Sep 2009 13:58:42 +0200
Subject: [PATCH] partial backport from cython-unstable: keep Python literals
 from loosing their type during type analysis

---
 Cython/Compiler/ExprNodes.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
index 2b0de0eb1..6d649a436 100644
--- a/Cython/Compiler/ExprNodes.py
+++ b/Cython/Compiler/ExprNodes.py
@@ -748,12 +748,13 @@ class PyConstNode(AtomicNewTempExprNode):
     #  Abstract base class for constant Python values.
     
     is_literal = 1
+    type = py_object_type
     
     def is_simple(self):
         return 1
     
     def analyse_types(self, env):
-        self.type = py_object_type
+        pass
     
     def calculate_result_code(self):
         return self.value
-- 
2.30.9