[Lxml-checkins] r46299 - in lxml/trunk: . src/lxml

scoder at codespeak.net scoder at codespeak.net
Tue Sep 4 09:57:20 CEST 2007


Author: scoder
Date: Tue Sep  4 09:57:19 2007
New Revision: 46299

Modified:
   lxml/trunk/Makefile
   lxml/trunk/src/lxml/classlookup.pxi
   lxml/trunk/src/lxml/objectify.pyx
   lxml/trunk/src/lxml/sax.py
Log:
docstring cleanup

Modified: lxml/trunk/Makefile
==============================================================================
--- lxml/trunk/Makefile	(original)
+++ lxml/trunk/Makefile	Tue Sep  4 09:57:19 2007
@@ -39,7 +39,7 @@
 	rm -fr doc/html/api
 	@[ -x "`which epydoc`" ] \
 		&& (cd src && echo "Generating API docs ..." && \
-			PYTHONPATH=. epydoc -o ../doc/html/api --name lxml --url http://codespeak.net/lxml/ lxml/) \
+			PYTHONPATH=. epydoc -v -o ../doc/html/api --name lxml --url http://codespeak.net/lxml/ lxml/) \
 		|| (echo "not generating epydoc API documentation")
 
 # XXX What should the default be?

Modified: lxml/trunk/src/lxml/classlookup.pxi
==============================================================================
--- lxml/trunk/src/lxml/classlookup.pxi	(original)
+++ lxml/trunk/src/lxml/classlookup.pxi	Tue Sep  4 09:57:19 2007
@@ -231,7 +231,7 @@
 cdef class CustomElementClassLookup(FallbackElementClassLookup):
     """Element class lookup based on a subclass method.
 
-    You can inherit from this class and override the method
+    You can inherit from this class and override the method::
 
         lookup(self, type, doc, namespace, name)
 

Modified: lxml/trunk/src/lxml/objectify.pyx
==============================================================================
--- lxml/trunk/src/lxml/objectify.pyx	(original)
+++ lxml/trunk/src/lxml/objectify.pyx	Tue Sep  4 09:57:19 2007
@@ -266,12 +266,14 @@
         _appendValue(self, _buildChildTag(self, tag), value)
 
     def __getitem__(self, key):
-        """Return a sibling, counting from the first child of the parent.
+        """Return a sibling, counting from the first child of the parent.  The
+        method behaves like both a dict and a sequence.
 
         * If argument is an integer, returns the sibling at that position.
 
-        * If argument is a string, does the same as getattr().  This is used
-          to provide namespaces for element lookup.
+        * If argument is a string, does the same as getattr().  This can be
+          used to provide namespaces for element lookup, or to look up
+          children with special names (``text`` etc.).
         """
         cdef tree.xmlNode* c_self_node
         cdef tree.xmlNode* c_parent

Modified: lxml/trunk/src/lxml/sax.py
==============================================================================
--- lxml/trunk/src/lxml/sax.py	(original)
+++ lxml/trunk/src/lxml/sax.py	Tue Sep  4 09:57:19 2007
@@ -1,8 +1,9 @@
 from xml.sax.handler import ContentHandler
-from etree import ElementTree, Element, SubElement, LxmlError
-from etree import XML, Comment, ProcessingInstruction
+import etree
+from etree import ElementTree, SubElement
+from etree import Comment, ProcessingInstruction
 
-class SaxError(LxmlError):
+class SaxError(etree.LxmlError):
     """General SAX error.
     """
     pass
@@ -24,7 +25,7 @@
         self._ns_mapping = { None : [None] }
         self._new_mappings = {}
         if makeelement is None:
-            makeelement = Element
+            makeelement = etree.Element
         self._makeelement = makeelement
 
     def _get_etree(self):


More information about the lxml-checkins mailing list