[Python-Dev] C-level duck typing (original) (raw)
martin at v.loewis.de martin at v.loewis.de
Thu May 17 10:27:32 CEST 2012
- Previous message: [Python-Dev] C-level duck typing
- Next message: [Python-Dev] C-level duck typing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
So maybe it's worth thinking about making a general mechanism available for third parties to extend the type object without them all needing to have their own tpflags bits and without needing to collude with each other to avoid conflicts.
That mechanism is already available. Subclass PyTypeType, and add whatever fields you want.
Regards, Martin
- Previous message: [Python-Dev] C-level duck typing
- Next message: [Python-Dev] C-level duck typing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]