On Thu, Jun 17, 2021 at 02:22:29PM -0700, Ben Rudiak-Gould wrote:
Okay, slightly off-topic, but can we *please* allow
[*chunk for chunk in list_of_lists]
What would that do? The only thing I can guess it would do is the equivalent of: result = [] for chunk in list_of_lists: result.append(*chunk) which is a long and obfuscated way of saying `raise TypeError` :-) Well, there is this: result = [] for chunk in list_of_lists: *temp, = chunk result.append(temp) which would make it an obfuscated way to spell `list(chunk)`.
some day. I think it was left out because some discussion concluded it would be too confusing, which is ridiculous. I assumed it would work and was confused to find that it didn't. It's blatantly inconsistent.
Blatently inconsistent with what? I have no idea what you are contrasting the non-support of sequence unpacking with. It's not this: >>> chunk = (1, 2, 3) >>> t = *chunk File "<stdin>", line 1 SyntaxError: can't use starred expression here but I can't tell what you're thinking of. Some context with sequence unpacking that is "slightly off-topic". -- Steve