kartagis / pysimplesoap

Automatically exported from code.google.com/p/pysimplesoap
0 stars 0 forks source link

SimpleXMLElement.__str__() returns empty #120

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
SimpleXMLELements prints (str()) as empty string, repr() is fine

Test above is with python 2.7.3 and pysimplesoap at rev 9e26ba790cfc

    SimpleXMLElement('<a></a>').__str__()
    --> u''
    SimpleXMLElement('<a></a>').__repr__()
    --> '<a/>'

Original issue reported on code.google.com by joce...@crapouillou.net on 30 Sep 2013 at 7:52

GoogleCodeExporter commented 8 years ago
You can close it actually, I think that it's a choice : __str__ gives the node 
content while __repr__ gives the node XML representation, 

cf http://stackoverflow.com/a/20091335/1377500

Original comment by joce...@crapouillou.net on 27 Nov 2013 at 2:01

GoogleCodeExporter commented 8 years ago

Original comment by reingart@gmail.com on 20 Dec 2013 at 7:46