Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
Additional notes: * reversed() is preferred over the range(n-1, -1, -1) style both for clarity and speed. If reversed is slower, then it would be mean that something is sly wrong with range.__reversed__ which should be able to iterate backwards as fast as range.__iter__ can go forwards (in part because they would use substantially the same code). * Minor PEP 8 whitespace changes are generally not accepted. Usually, the code churn isn't worth it. * [:n] is superfluous but it serves as a nice reminder of the definition of the function and will prevent a bug when I tweak the cut-over point from n >= size to some large fraction of the size (a change I'm currently considering). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34210> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com