symmetryinvestments / autowrap

Wrap existing D code for use in Python, Excel, C#
BSD 3-Clause "New" or "Revised" License
80 stars 16 forks source link

Q: how to pass Python's None to D's null? #312

Closed mw66 closed 1 year ago

mw66 commented 2 years ago

Hi,

I have a Python variable which default to None, and I need to pass it back to D side as null (basically I'm calling a D function, and want to pass a D null via autowrap), but I got an error:

.dub/packages/pyd-0.14.3/pyd/infrastructure/pyd/make_object.d(704): Couldn't convert Python type 'NoneType' to D type 'TheClassDType'

Is this a bug / enhancement? or there is some work-around?

Thanks.

I'm not sure this is a autowrap or pyd issue, so I logged same issue here:

https://github.com/ariovistus/pyd/issues/160

atilaneves commented 1 year ago

That's a question for pyd.