autowrap
autowrap copied to clipboard
Pynih should represent as some kind of standard sensible type in D a python thing that can be anything 8
Maybe sumtype or Variable
Do you have an example of a Python type that can be anything? Does pyd have something similar?
I think what's meant is a generic "Python Variable" type, so on the D side you can work with something returned from python without knowing at compilation time what type it's going to be.
I'm having difficulty imagining how D code could deal with such a generic Python type value in any meaningful way, or what the real-life use case might be. That is, an example would be useful.
Real use is interfacing to SIL. I guess it's a pyobject but often it's going to be something simple like a string or a dict. In which case a bit more work could be done by autowrap. See call python code in SIL stdlib for an example..