Message322404
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). |
|
Date |
User |
Action |
Args |
2018-07-26 06:53:54 | rhettinger | set | recipients:
+ rhettinger, amper |
2018-07-26 06:53:54 | rhettinger | set | messageid: <1532588034.15.0.56676864532.issue34210@psf.upfronthosting.co.za> |
2018-07-26 06:53:54 | rhettinger | link | issue34210 messages |
2018-07-26 06:53:53 | rhettinger | create | |
|