Re: [Cython] [ENH] Compile-time code execution (macros / templates)

2021-02-28 Thread Celelibi
Hm. If I understand correctly what you want is to generate attributes at compile-time and then get all the benefits of having statically declared attributes at run-time. This looks like a very interesting use-case. I guess it's a kind of named tuples with custom methods. The syntax you propose is

Re: [Cython] How best to contribute

2021-02-28 Thread Henry Schmale
Hi Matti, I've been on the developer mailing list for a while just soaking in the knowledge. I can't really contribute because of who my employer is, and how difficult it is to secure approvals. However I would love to join your calls if you want to schedule them. I for one am glad cython exists

Re: [Cython] [ENH] Compile-time code execution (macros / templates)

2021-02-28 Thread Brock Mendel
Would the following be a good use case for what you're discussing? ``` cdef class Base: cdef __cinit__(self, **kwargs): for name in self.list_defined_on_subclass: value = kwargs[name] setattr(self, name, value) cpdef copy(self): kwargs = {name: g