[PyKDE] Sip wishlist item: Parameter typechecking enhancement
Nigel Stewart
ns at fluent.com
Mon Jul 18 17:43:43 BST 2005
>>In a nutshell, I want a wrapped constructor to pass
>>a wrapped Foo as a PyObject parameter, but I'd prefer
>>sip to do the typecheck that PyObject is a Foo, rather
>>than trying to deal with it on the C++ side.
>
> How about the GetWrapper annotation?
Nearly!
Annotating the parameter with GetWrapper
makes the PyObject available as a0Wrapper,
and doing the type check...
...but a0 is being passed as the argument,
rather than a0Wrapper.
Is there a way to avoid maintaining
method code to pass q0Wrapper
rather than a0?
> Bar(Foo & /GetWrapper/);
> Bar(Foo & /PassWrapper/); ??
Nigel
More information about the PyQt
mailing list