[Python-Dev] cpython: allow arbitrary attributes on classmethod and staticmethod (closes #14051) (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Sun Feb 19 13:21:11 CET 2012
- Previous message: [Python-Dev] cpython: allow arbitrary attributes on classmethod and staticmethod (closes #14051)
- Next message: [Python-Dev] C-API functions for reading/writing tstate->exc_* ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
That's answering to Benjamin's f46deae68e34, by the way.
Regards
Antoine.
On Sun, 19 Feb 2012 13:11:22 +0100 Antoine Pitrou <solipsis at pitrou.net> wrote:
Hi, > +static PyObject * > +cmget_dict(classmethod *cm, void *closure)_ > +{ > + PyINCREF(cm->cmdict); > + return cm->cmdict; > +} >>> def f(): pass ... >>> cm = classmethod(f) >>> cm.dict Erreur de segmentation
Regards Antoine.
- Previous message: [Python-Dev] cpython: allow arbitrary attributes on classmethod and staticmethod (closes #14051)
- Next message: [Python-Dev] C-API functions for reading/writing tstate->exc_* ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]