[Lxml-checkins] r44720 - lxml/branch/lxml-1.3/src/lxml

scoder at codespeak.net scoder at codespeak.net
Wed Jul 4 12:07:07 CEST 2007


Author: scoder
Date: Wed Jul  4 12:07:07 2007
New Revision: 44720

Modified:
   lxml/branch/lxml-1.3/src/lxml/objectify.pyx
Log:
support unicode strings in objectify.E

Modified: lxml/branch/lxml-1.3/src/lxml/objectify.pyx
==============================================================================
--- lxml/branch/lxml-1.3/src/lxml/objectify.pyx	(original)
+++ lxml/branch/lxml-1.3/src/lxml/objectify.pyx	Wed Jul  4 12:07:07 2007
@@ -1655,10 +1655,11 @@
 
 def __add_text(_Element elem not None, text):
     cdef tree.xmlNode* c_child
-    if isinstance(text, bool):
-        text = str(text).lower()
-    else:
-        text = str(text)
+    if not python._isString(text):
+        if isinstance(text, bool):
+            text = str(text).lower()
+        else:
+            text = str(text)
     c_child = cetree.findChildBackwards(elem._c_node, 0)
     if c_child is not NULL:
         old = cetree.tailOf(c_child)


More information about the lxml-checkins mailing list