Stefan Behnel added the comment: IMHO, it makes sense to support this. My intuition tells me that lxml also handles this as expected, by accident through iteration.
Not sure how to do this correctly in ET, though. Special case dict? Or special case OrderedDict? Both would leave some reasonable use cases uncovered, e.g. dict subclasses that do not impact iteration, and self-implemented OrderedDict-like types. And being too broad in the special casing will certainly kill someone's doctests somewhere... Given that OrderedDict is the one way to do this in recent Python versions, I guess it would be reasonable to special case on that type. ---------- nosy: +eli.bendersky, scoder _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20198> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com