syntax for preset locals without using dummy args with defaults
Bernhard Herzog
bh at intevation.de
Sat Jan 11 11:24:21 EST 2003
Andrew Dalke <adalke at mindspring.com> writes:
> Terry Reedy wrote:
> >> def foo(x, y=default)(z=some_expression):
> > -1/2 on this syntax. I would prefer ';' instead of ',' to mark end of
> > run-time variable params and start of define-tine fixed params. Have
> > no idea how difficult it would be to have compiler differentiate
> > between this and ';' as statement separator.
>
> Just so I know, do you mean like
>
> def spam(x, y=default; z=some_expression):
> ...
IMO this kind of syntax if adopted at all should mean that the
parameters following the ';' must be given as keyword and not as
positional arguments.
Define time parameters should not be inside of the parentheses at all,
only parameters that can be supplied by the caller belong there.
Bernhard
--
Intevation GmbH http://intevation.de/
Sketch http://sketch.sourceforge.net/
MapIt! http://www.mapit.de/
More information about the Python-list
mailing list