[Python-Dev] can't set attributes of built-in/extension type

"Martin v. Löwis" martin at v.loewis.de
Sun Feb 24 05:49:09 CET 2008


> (Or, help me understand, what is the difference between a type that I create
> using python C api and a python class?)

Grepping for the specific error message would have answered that 
question: Python (new-style) classes have the Py_TPFLAGS_HEAPTYPE
set, types declared as static structs in C don't.

Regards,
Martin


More information about the Python-Dev mailing list