Message358276
It might make sense that CSimpleData types do not call init, which makes sense for _fields_ but it doesn't make sense to offer subclassing (of Structure) and not use the subclass, instead creating a type of the same name.
That test case is bugged, missing an underscore... The git blame wasn't "available" for that particular test but I would argue that it's testing for undocumented behavior :p
I wanted to be able to do assertions/initialization, I'm sure other people have expected from_buffer(_copy) et al would act as a class method, returning an instance of the subclass.
More generally, I think that GenericPyCData_new should not "tp_alloc"... What's _new about that?
My guess is there was at some level desire to "optimize" ctypes. If that does turn out to be the case I'd hope for a "unsimple" CData and ask that Structure be an instance of that.
Either way docs reflecting the behavior to Structure would be nice, I just hope it includes "prior to version" :p thanks for taking a look |
|
Date |
User |
Action |
Args |
2019-12-11 18:32:00 | b1tninja | set | recipients:
+ b1tninja, aeros, LewisGaul, beccamorgan |
2019-12-11 18:31:59 | b1tninja | set | messageid: <1576089119.95.0.741054231039.issue38860@roundup.psfhosted.org> |
2019-12-11 18:31:59 | b1tninja | link | issue38860 messages |
2019-12-11 18:31:59 | b1tninja | create | |
|