[Lxml-checkins] r44719 - lxml/trunk/src/lxml
scoder at codespeak.net
scoder at codespeak.net
Wed Jul 4 12:06:50 CEST 2007
Author: scoder
Date: Wed Jul 4 12:06:48 2007
New Revision: 44719
Modified:
lxml/trunk/src/lxml/objectify.pyx
Log:
support unicode strings in objectify.E
Modified: lxml/trunk/src/lxml/objectify.pyx
==============================================================================
--- lxml/trunk/src/lxml/objectify.pyx (original)
+++ lxml/trunk/src/lxml/objectify.pyx Wed Jul 4 12:06:48 2007
@@ -1868,10 +1868,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