<div dir="ltr"><div class="gmail_extra"><span class="gmail-"></span><br><span class="gmail-"></span><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Your implementation iterates seq multiple times. But iterable unpacking syntax works with an arbitrary iterable, and iterates it only once.<br></blockquote><div><br></div><div>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. <span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">I just want to understand if it's worth the time and effort.</span></span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Changing the result of iterable unpacking will break existing code that depends on the result been a list.<br></blockquote><div><br></div><div><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">Backward compatibility is an important issue, but at the same time it is the main brake on progress.</span></span> <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
And you already have mentioned a question about mutable sequence.<br>
<br>
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.<br></blockquote><div><br></div><div><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-">And how do you look at something like this (deferred star evaluation)?:</span></span></div><div><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-"><br></span></span></div><div><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-">a, ?*b, c, d = something_iterable</span></span></div><div><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-"><br></span></span></div><div><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-">With kind regards, -gdg<br></span></span></div><div><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-"><br></span></span></div></div><br></div></div>