This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Ramchandra Apte, eric.snow, pitrou, rhettinger, serhiy.storchaka
Date 2013-02-02.07:56:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359791643.3476.2.camel@localhost.localdomain>
In-reply-to <1359790373.16.0.802564479647.issue17100@psf.upfronthosting.co.za>
Content
> It is trivial.
> 
> def rotate(od, n):
>     for i in range(n):
>         k, v = od.popitem(False)
>         od[k] = v

That's O(n), with many spurious insertions and deletions.

> And those functions look too specialized.

How so? rotating sounds quite generic to me. deques already allow
rotating.
History
Date User Action Args
2013-02-02 07:56:56pitrousetrecipients: + pitrou, rhettinger, eric.snow, Ramchandra Apte, serhiy.storchaka
2013-02-02 07:56:56pitroulinkissue17100 messages
2013-02-02 07:56:55pitroucreate