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

scoder at codespeak.net scoder at codespeak.net
Thu Sep 13 19:38:16 CEST 2007


Author: scoder
Date: Thu Sep 13 19:38:16 2007
New Revision: 46551

Modified:
   lxml/trunk/src/lxml/etree.pyx
Log:
doc fix - not sure if we should remove getchildren()

Modified: lxml/trunk/src/lxml/etree.pyx
==============================================================================
--- lxml/trunk/src/lxml/etree.pyx	(original)
+++ lxml/trunk/src/lxml/etree.pyx	Thu Sep 13 19:38:16 2007
@@ -984,10 +984,18 @@
         return _collectAttributes(self._c_node, 3)
 
     def getchildren(self):
-        """Returns all subelements. The elements are returned in document order.
+        """Returns all direct children.  The elements are returned in document
+        order.
         """
         cdef xmlNode* c_node
         cdef int ret
+# ET 1.3 stops supporting this ...
+##         import warnings
+##         warnings.warn(
+##             "This method will be removed in future versions. "
+##             "Use 'list(elem)' or iteration over elem instead.",
+##             DeprecationWarning
+##             )
         result = []
         c_node = self._c_node.children
         while c_node is not NULL:


More information about the lxml-checkins mailing list