Re: Function naming: Problems and proposed solution

On Sun, 29 Nov 2020 at 00:05, Dimitre Novatchev <dnovatchev@gmail.com> wrote:

> This could work, but we can soon end up with:
>
> my:myFn(arg1,,,,,,,,,,arg10)
>
> or even worse:
>
> my:myFn(arg1,,,,, arg5 ,,,,,arg10)

Python gets round this by only allowing defaulted arguments as the
last n arguments, giving
my:myFn(arg1,arg2 ,arg3)

Or specifically naming params

my:myFn(arg1,,,,, p5=arg5 ,,,,,p10=arg10)

regards


-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.

Received on Sunday, 29 November 2020 08:34:15 UTC