> Your implementation iterates seq multiple times. But iterable unpacking
> syntax works with an arbitrary iterable, and iterates it only once.
>

Oh sorry, I know that my implementation iterates seq multiple times, I only
provide this to show the idea. It can be much optimized at C level. I just
want to understand if it's worth the time and effort.


> Changing the result of iterable unpacking will break existing code that
> depends on the result been a list.
>

Backward compatibility is an important issue, but at the same time it is
the main brake on progress.


> And you already have mentioned a question about mutable sequence.
>
> If these conditions and restrictions suit you, you can use your
> good_star_exp() in your code or share it with others. But the semantic of
> iterable unpacking can't be changed.
>

And how do you look at something like this (deferred star evaluation)?:

a, ?*b, c, d = something_iterable

With kind regards, -gdg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to