With keyword-only parameters allowed now, I think it makes sense to be able
to supply the keywords arguments after the variable length argument as well.
Agreed. I doubt that this will be a simple enough change to allow it
in 3.0 though.
Sure would be nice if it could go in. IMO, the functionality is an essential companion to keyword-only parameters.
Looking at the Py2.6 version of the same itertools recipe, the workaround is
somewhat unattractive:
def grouper(n, iterable, fillvalue=None):
"grouper(3, 'abcdefg', 'x') --> abc def gxx"
args = [iter(iterable)] * n
kwds = dict(fillvalue=fillvalue)
return izip_longest(*args, **kwds)
Raymond
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com