[Python-ideas] Unpack of sequences

Mike Graham mikegraham at gmail.com
Thu Aug 30 17:56:45 CEST 2012


On Thu, Aug 30, 2012 at 11:46 AM, Serhiy Storchaka <storchaka at gmail.com> wrote:
> On 30.08.12 05:25, Greg Ewing wrote:
>>
>> How about
>>
>>     a, b, c, ... = d
>
>
> SyntaxError: can't assign to Ellipsis

The fact that it's currently a syntax error speaks in favour of the
suggestion—if it was currently valid Python, you wouldn't want to make
it do anything else.

That being said, `a, b, c, *_ = d` or similar is probably better than
introducing a new way.

Mike



More information about the Python-ideas mailing list