[Python-3000] Is this really a SyntaxError?

Raymond Hettinger python at rcn.com
Wed Jul 30 03:19:11 CEST 2008

>> 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)


More information about the Python-3000 mailing list