public marks

PUBLIC MARKS from image with tags maxleng & recipes

27 March 2007 03:45

ASPN : Python Cookbook : Padding variable length sequences

even simpler variable-length tuple unpacking, Greg Jorgensen, 2005/03/31 I can reduce that function even more: def vunpack(t, n, defaults=[]): return tuple( (list(t) + list(defaults)[len(t):] + [None] * n)[0:n] ) One of the examples in my f

image's TAGS related to tag maxleng

closure +   comment +   defaults +   elements +   extra +   extraitems +   false +   fixed +   function +   Greg +   items +   iterable +   iterables +   jorgensen +   length +   list +   lists +   longer +   minlength +   missing +   padded +   print +   problem +   recipes +   rest +   return +   slower +   true +   tuple +   Tuples +   unpacking +   variable +   vunpack +