[Python-ideas] Positional only arguments
Fred L. Drake, Jr.
fdrake at acm.org
Fri May 18 14:51:20 CEST 2007
On Thursday 17 May 2007, George Sakkis wrote:
> single "delimiter" symbol (e.g. '%') between pos-only and pos-or-kw
> would kill both birds with one stone, i.e. something like:
A delimeter that would be needed anyway would make this a little nicer:
def myfunc(a, b, c=24; *, kw=42):
pass
This example would have 3 positional-only arguments (a, b, c) and one
keyword-only argument (kw).
Replacing the comma with a semicolon avoids the need for a syntax-only
position (good, IMO), avoids introducing a new special character, and re-uses
one that's rarely used anyway.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
More information about the Python-ideas
mailing list