osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] cpython: allow arbitrary attributes on classmethod and staticmethod (closes #14051)


Hi,

> +static PyObject *
> +cm_get___dict__(classmethod *cm, void *closure)
> +{
> +    Py_INCREF(cm->cm_dict);
> +    return cm->cm_dict;
> +}

>>> def f(): pass
... 
>>> cm = classmethod(f)
>>> cm.__dict__
Erreur de segmentation


Regards

Antoine.