[Lxml-checkins] r43422 - lxml/trunk/src/lxml

scoder at codespeak.net scoder at codespeak.net
Wed May 16 00:19:16 CEST 2007


Author: scoder
Date: Wed May 16 00:19:16 2007
New Revision: 43422

Modified:
   lxml/trunk/src/lxml/extensions.pxi
Log:
default to returning str(value) from XPath string coercion function instead of exception

Modified: lxml/trunk/src/lxml/extensions.pxi
==============================================================================
--- lxml/trunk/src/lxml/extensions.pxi	(original)
+++ lxml/trunk/src/lxml/extensions.pxi	Wed May 16 00:19:16 2007
@@ -341,7 +341,7 @@
             else:
                 return str(firstnode)
         else:
-            raise TypeError, "Invalid argument type %s" % type(value)
+            return str(value)
 
     cdef _compile(self, rexp, ignore_case):
         cdef python.PyObject* c_result


More information about the lxml-checkins mailing list