Serhiy Storchaka added the comment: > That's O(n), with many spurious insertions and deletions.
Any implementation is O(n). > deques already allow rotating. I agree that the rotation makes some sense for such collections as deque or OrderedDict (although it is easy implemented in user code). But there are no rotate_at() and rotate_after() in deque. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17100> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com