[issue40088] list.reverse(): slow sublist reverse

2020-03-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the suggestion, but the need isn't common enough to warrant an API expansion. If this were a popular operation, it might be worth optimizing, the need almost never arises. -- resolution: -> rejected stage: -> resolved status: open ->

[issue40088] list.reverse(): slow sublist reverse

2020-03-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: The previous issue was also about .sort and Raymond's rejection was mostly about .sort. I will let him comment about whether the speedup moves him at all. Yury, please say something about your use case. -- nosy: +terry.reedy ___

[issue40088] list.reverse(): slow sublist reverse

2020-03-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This looks like a duplicate of https://bugs.python.org/issue1491804 -- nosy: +rhettinger, xtreak ___ Python tracker ___ ___

[issue40088] list.reverse(): slow sublist reverse

2020-03-27 Thread Yury Norov
New submission from Yury Norov : Hi all, In Python, I need a tool to reverse part of a list (tail) quickly. I expected that nums[start:end].reverse() would do it inplace with the performance similar to nums.reverse(). However, it doesn't work at all. The fastest way to reverse a part