ElementTree and cElementTree give slightly different results for repr(Element): >>> import xml.etree.ElementTree as ET >>> import xml.etree.cElementTree as cET >>> repr(ET.ElementTree('tag')) '' >>> repr(cET.ElementTree('tag') "<Element 'tag' at 0xb7c266f8>" The quoting around the tag name is missing from ElementTree. This inconsistency seems pointless. Attached patch changes ElementTree to match cElementTree behaviour, and adds a test.