syntax for preset locals without using dummy args with defaults

Bernhard Herzog bh at
Sat Jan 11 17:24:21 CET 2003

Andrew Dalke <adalke at> 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.


Intevation GmbH                       

More information about the Python-list mailing list