Steven D'Aprano <[EMAIL PROTECTED]> writes:
> >     def izip5(*iterables, fill=None):
> Doesn't work: keyword arguments must be listed before * and ** arguments.

Eh, ok, gotta use **kw.

> def function(*iterators, **kwargs):
>     if kwargs.keys() != ["fill"]:
>         raise ValueError
>     ...
> 
> It might not be the easiest API to extend, but for a special case like
> this, I think it is perfectly usable.

Yeah, that's what the earlier version had.  I tried to bypass it but
as you pointed out, it's a syntax error.  The code I posted also has a
deliberate syntax error (until Python 2.5), namely the use of the new
conditional expression syntax (PEP 308).  That could be worked around
of course.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to