Requiring arguments to be passed as keyword arguments
Michael Haggerty
mhagger at blizzard.harvard.edu
Wed Oct 6 20:01:55 EDT 1999
The goal isn't to multiply the number of possible kludges, but rather
to make this possible in a convenient, obvious, maintainable way.
Duncan Booth <duncan at rcp.co.uk> wrote ...
>
> This is a kludge, but you can avoid accidental positional arguments if you
> stick in a tuple argument:
> >>> def f(x, (donotuse,)=(None,), variation=57):
By the way, didn't I hear that tuples-in-parameter-lists are going to
be removed from Python?
Michael
--
Michael Haggerty
mhagger at blizzard.harvard.edu
More information about the Python-list
mailing list