Message377478
Timings depend on multiple factors, including implementation (cpython versus pypy versus cython, etc) and complexity of the keep/discard decision. I said in the proposed text that a listcomp may be faster. I think that sufficient; anyone who cares can test their specific case.
I like the simple ad easy 'slice replacement = iterator' form because it illustrates to me that we have done something right with Python's design. |
|
| Date |
User |
Action |
Args |
| 2020-09-25 04:05:35 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, paul.moore, eric.smith, steven.daprano, sreedevi.ha |
| 2020-09-25 04:05:35 | terry.reedy | set | messageid: <[email protected]> |
| 2020-09-25 04:05:35 | terry.reedy | link | issue41774 messages |
| 2020-09-25 04:05:35 | terry.reedy | create | |
|