libxml2dom

Changeset

359:2f30ff7df51f
2012-01-29 Paul Boddie raw files shortlog changelog graph Added a custom string representation for Node instances.
libxml2dom/__init__.py (file)
     1.1 --- a/libxml2dom/__init__.py	Sun Feb 27 21:44:55 2011 +0100
     1.2 +++ b/libxml2dom/__init__.py	Sun Jan 29 00:35:51 2012 +0100
     1.3 @@ -226,6 +226,9 @@
     1.4          self.impl = impl or default_impl
     1.5          self.ownerDocument = ownerDocument
     1.6  
     1.7 +    def __repr__(self):
     1.8 +        return "<%s: %r>" % (self.__class__.__name__, self.nodeName)
     1.9 +
    1.10      def as_native_node(self):
    1.11          return self._node
    1.12