MCPcopy Create free account
hub / github.com/gawel/pyquery / __str__

Method __str__

pyquery/pyquery.py:347–356  ·  view source on GitHub ↗

xml representation of current nodes:: >>> xml = PyQuery( ... ' <![[CDATA[ ]> ', parser='html_fragments') >>> print(str(xml)) &lt;![[CDATA[ ]&gt;

(self)

Source from the content-addressed store, hash-verified

345 return self
346
347 def __str__(self):
348 """xml representation of current nodes::
349
350 >>> xml = PyQuery(
351 ... '<script><![[CDATA[ ]></script>', parser='html_fragments')
352 >>> print(str(xml))
353 <script>&lt;![[CDATA[ ]&gt;</script>
354
355 """
356 return ''.join([etree.tostring(e, encoding=str) for e in self])
357
358 def __unicode__(self):
359 """xml representation of current nodes"""

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected