Antoine Pitrou added the comment:

> This does not meet your requirement of supporting insert_after(x),
> its insert(x, before) requires to give a dllistnode.

Indeed it lacks that piece of prettiness in the API. And adding a mapping to 
allow lookups from item to node really means using a orderedset or 
ordereddict-like structure. Which is why I was proposing to reuse the existing 
infrastructure.

(note that I *cannot* reuse it from my own third-party class, since the 
necessary bits are all internal)

Still you may make the point that ordereddict is not appropriate, andorderedset 
would be better for this API. Raymond, would you support adding an orderedset 
to the collections module?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22097>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to