John O'Connor added the comment:

Looking at the implementation (rather quickly)[1]. I'm wondering if there is a 
reason why the appendleft(pop()) loop is required. It would seem the best way 
would be to determine the new head link, make the previous link the new end 
link and concatenate the two chains (by just swapping some pointers).
        

[1]. 
http://hg.python.org/cpython/file/a4292889e942/Modules/_collectionsmodule.c#l429

----------

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

Reply via email to