Python Functions
Python functions can be declared as usual zig functions at top level of the module
Functions come with __text_signature__ support out of the box. Function double
will have signature (x, /)
.
Functions also accept keyword arguments as regular python function. Argument is deemed to be a kwarg argument if it has a default value associated with it for a function:
The generated signature will be (x, /, *, y=42.0)
Python's variadic arguments *args
and **kwargs
are represented by including py.Args
and py.Kwargs
attributes
in your args struct.