-
Notifications
You must be signed in to change notification settings - Fork 30
FuncWrap
Laeeth Isharc edited this page Mar 19, 2015
·
1 revision
Exposing D functions to Python is easy!
The heart of Pyd's function wrapping features is the def template function.
- All calls to def must occur before calling module_init.
- Any function whose return type and arguments are convertible can be wrapped by def.
- def can only wrap functions with in arguments (not out or ref or lazy).
- def can handle functions with default and typesafe variadic (e.g. ) arguments.
- def supports skipping default arguments (on the python side) and will automatically fill in any omitted default arguments.
- def-wrapped functions can take keyword arguments in python.
And when used in Python: