Commits

Anonymous committed fbaa60d

Clarify the doctest of outerHtml()

Comments (0)

Files changed (1)

pyquery/pyquery.py

     def outerHtml(self):
         """Get the html representation of the first selected element.
 
-            
-
-            >>> d = PyQuery('<div class="red">toto</div>')
-            >>> print d
-            <div class="red">toto</div>
-        """
+            >>> d = PyQuery('<div><span class="red">toto</span> rocks</div>')
+            >>> print d('span')
+            <span class="red">toto</span> rocks
+            >>> print d('span').outerHtml()
+            <span class="red">toto</span>
+        """
+        
         if not self:
             return None
         e0 = self[0]