[Python-ideas] Boundaries for unpacking

Michel Desmoulin desmoulinmichel at gmail.com
Thu Apr 7 14:13:16 EDT 2016


Ignoring the fact that it's inelegant and verbose (not even counting the
import), the biggest problem is that there is no way I will ever
remember it. Which mean everytime I want to do it (probably twice a
week), I will have to look it up on the doc, just like I do with
itertools.groupby or the receipe to iterate on a window of values.

Le 07/04/2016 19:44, Todd a écrit :
> a, b, c, *d = itertools.chain(iterable, itertools.repeat('default value'))


More information about the Python-ideas mailing list