You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be desirable to create subclasses of com_record to enable typing of interface methods that expect a particular structure as a parameter.
I've just started to look into writing C/C++ Python extensions and therefore probably do not understand what problems it would create when the PyRecord::Type structure would be modified to allow this.
and to define a function for the tp_new field in the PyRecord::Type structure?
This function could make use of the PyRecord::pythoncom_GetRecordFromGuids function to create the new instance.
I'm wondering what the reason was, to just allow the creation of com_record instances via the factory function win32com.client.Record and not allow the creation of subclasses. Would this open a Pandora's box of issues that I probably do not see?
The text was updated successfully, but these errors were encountered:
It would be desirable to create subclasses of
com_record
to enable typing of interface methods that expect a particular structure as a parameter.I've just started to look into writing C/C++ Python extensions and therefore probably do not understand what problems it would create when the
PyRecord::Type
structure would be modified to allow this.Wouldn't it be just sufficient to set the field:
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags
and to define a function for the
tp_new
field in thePyRecord::Type
structure?This function could make use of the
PyRecord::pythoncom_GetRecordFromGuids
function to create the new instance.I'm wondering what the reason was, to just allow the creation of
com_record
instances via the factory functionwin32com.client.Record
and not allow the creation of subclasses. Would this open a Pandora's box of issues that I probably do not see?The text was updated successfully, but these errors were encountered: