[Python-Dev] Proposal: add odict to collections

Stefan Behnel stefan_ml at behnel.de
Sun Jun 15 14:40:36 CEST 2008


Armin Ronacher wrote:
>   - in XML/HTML processing it's often desired to keep the attributes of
>     an tag ordered during processing.  So that input ordering is the
>     same as the output ordering.
> 
>   - [...]
>     XML libraries such as etree could add support for it when creating
>     elements or return attribute dicts.

I hope that what you call "etree" here (I assume you mean ElementTree) would
stay compatible to lxml.etree in that case. Meaning: adding or replacing an
attribute removes a possibly existing entry and appends the new value at the end.

Stefan



More information about the Python-Dev mailing list