Re: [Cython] Auto-generation of wrapper types

2020-03-13 Thread Schlimbach, Frank
I like automatism, this one looks useful. How would you allow extending the Extension type with a new attribute or method? I'd expect that in many cases you need to do more than just wrapping the C class/struct. -Original Message- From: cython-devel On Behalf Of da-woods Sent: Thursda

Re: [Cython] Auto-generation of wrapper types

2020-03-13 Thread da-woods
(Sorry, originally replied just to Frank not to the list) If I understand you correctly it'd be something like: cdef class WrappingOfS(autowrap[S]):    def new_method(self):   # implementation i.e. if you want to do something the automation can't do then you just inherit. If I don't unde

Re: [Cython] Auto-generation of wrapper types

2020-03-13 Thread Schlimbach, Frank
Right. Sorry, not sure what I was thinking. Instead of a staticmethod constructor, maybe it's more useful to have a keyword arg for the name of the generated extension class? -Original Message- From: cython-devel On Behalf Of da-woods Sent: Friday, March 13, 2020 12:02 PM To: cython-de

Re: [Cython] Auto-generation of wrapper types

2020-03-13 Thread da-woods
The staticmethod constructor is useful I think - regular constructors can't take C/C++ types so the static method constructor provides a means of doing something like:     cdef mycppclass inst = # some call to cpp     return wrapperclass.create(inst) I definitely agree you want some means of n