[Python-3000] Pronouncement on parameter lists
Baptiste Carvello
baptiste13 at altern.org
Sun Apr 23 14:21:55 CEST 2006
Greg Ewing a écrit :
> Jim Jewett wrote:
>
>
>>It has not yet been specified what would happen to additional
>>positional arguments that get passed in anyway. (Swallow or raise an
>>Exception?)
>
>
> I've always intended that there would be an exception.
>
If so, why not replace the lone star, whose meaning is not clear, with
"*forbidden", as in:
def f(a, b, *forbidden, c, d=1)
The meaning would be clearer: "remaining positional arguments are forbidden, and
will thus raise an exception".
Baptiste
More information about the Python-3000
mailing list