On Mon, Apr 27, 2020 at 9:57 AM Steven D'Aprano <steve@pearwood.info> wrote:
I don't especially want zip_whatever to be slow, but the stdlib has no obligation to provide a super-fast highly optimized C accelerated version of **everything**. Especially not backports. It is perfectly acceptable to say:
"Here's a functionally equivalent version that works in Python 3.old, if you want speed then provide your own C version or upgrade to 3.new"
True, but if taking the backport causes ALL your zip() objects to underperform, then that's a cost. It's not just "here's a slower version that works on 3.old", it's "here's a more functional version but it slows down other stuff". Still, performance of backported code is a lower consideration than getting the API right. (For the record, I still prefer the separate-functions option, but what Steven's described is a very reasonable zip-gets-methods option.) ChrisA