El jue, 17 jun 2021 a las 14:45, David Mertz (<me...@gnosis.cx>) escribió:

> On Thu, Jun 17, 2021, 5:24 PM Ben Rudiak-Gould
>
>> Okay, slightly off-topic, but can we *please* allow
>>
>>     [*chunk for chunk in list_of_lists]
>>
>
> It is completely non-obvious to me what that would even MEAN. I cannot
> derive anything obvious from other uses of *.
>
> If I had to guess, I'd think that this was tuple unpacking, and the result
> would be a list of tuples. However, apparently in your mind there is some
> way to read this as "flatten." I don't know how to get there mentally
> (other than just memorizing a weird behavior).
>
My reading is that it would behave like `[*chunk1, *chunk2, *chunk3]` would
behave if `list_of_lists = [chunk1, chunk2, chunk3]`. I would support
adding this behavior to Python.


> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-le...@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/M6WRDGFDIEYISMFSWIZL4P4ZTTDKARI5/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/2SJ36GMFAL7IPONSD7J4NZH7LAVIYOFM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to