This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author b1tninja
Recipients b1tninja
Date 2019-11-20.02:34:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
When subclassing the ctypes.Structure class, __new__ and __init__ are not invoked when using the inherited classmethod from_buffer_copy to create the object.

I think this is because tp_alloc is ultimately used by GenericPyCData_new when creating the object using the from_buffer_copy classmethod inherited from _CData.

Expected behavior: creation of Structure subclass object would invoke __new__ and possibly __init__.
Date User Action Args
2019-11-20 02:34:04b1tninjasetrecipients: + b1tninja
2019-11-20 02:34:04b1tninjasetmessageid: <>
2019-11-20 02:34:04b1tninjalinkissue38860 messages
2019-11-20 02:34:03b1tninjacreate