POn Sat, Oct 16, 2021, 10:10 AM Erik Demaine

> (*it1, *it2, *it3)  # tuple with the concatenation of three iterables
> [*it1, *it2, *it3]  # list with the concatenation of three iterables
> {*it1, *it2, *it3}  # set with the union of three iterables
> {**dict1, **dict2, **dict3}  # dict with the combination of three dicts


I'm +0 on the last three of these.

But the first one is much more suggestive of a generator comprehension. I
would want/expect it to be equivalent to itertools.chain(), not create a
tuple.

Moreover, it is an anti-pattern to create large and indefinite sized
tuples, whereas such large collections as lists, sets, and dicts are common
and useful.
_______________________________________________
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/OZ3VBETDU2PSR7ZZ4UGYZKHCOIEEKK3Q/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to