1 Sep
2012
1 Sep
'12
12:03 a.m.
Steven D'Aprano wrote:
For sequences:
a, b, c, d = really_long_sequence[:4]
Sure, there are any number of ways of doing it, but they all involve some degree of convolution or DRY-violation. The most direct and obvious way is denied to us, because there is no way to tell the unpacking operation *not* to check for the end of the sequence afterwards. Because that unwanted check is forced on us, we have to perform even more useless work to get around it. That seems perverse to me. -- Greg