[Python-3000] Is this really a SyntaxError?
Guido van Rossum
guido at python.org
Wed Jul 30 01:18:41 CEST 2008
On Tue, Jul 29, 2008 at 3:51 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Georg Brandl wrote:
>> Georg Brandl schrieb:
>>> Someone just wrote to the docs mailing list and reported that the
>>> documentation for Py3k contains this recipe:
>>> def grouper(n, iterable, fillvalue=None):
>>> args = [iter(iterable)] * n
>>> return zip_longest(*args, fillvalue=fillvalue)
>>> It is currently a syntax error in 3k. There's also a test for it in
>>> test_keywordonlyarg.py, however, I can currently see no reason why
>>> it should be disallowed.
>> No opinions at all?
> I think I was busy first time it went by :)
> 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.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000