[Python-3000] Pronouncement on parameter lists

Josiah Carlson jcarlson at uci.edu
Mon Apr 24 01:08:21 CEST 2006


Baptiste Carvello <baptiste13 at altern.org> wrote:
> 
> 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".

It seems as though you are proposing to create a pseudo-keyword embedded
inside a function definition, even though 'forbidden', or really any
other reasonably lengthed pseudo-keyword has two meanings.  While you
would say "it will raise an exception", I could say, "it's to tell us
what values are forbidden for some other task.  -1 on the use of _any_
pseudo-keyword inside of function definitions.

 - Josiah



More information about the Python-3000 mailing list