[Python-Dev] PyObject_SetAttr - is it the only way types should set attributes?

Guido van Rossum guido@python.org
Wed, 15 Aug 2001 13:14:10 -0400

> C code can manipulate __dict__, too, right?  It's a pretty common
> idiom to get a module dictionary and use PyDict_SetItem().  

Yes -- always using the PyModule_GetDict() API.

> I'm also curious about the new type-class unification stuff.  Is it
> possible to modify a C object via something like a C struct and have
> that change be visible as a modified attrbute at the Python level?

Can you clarify this question?  I feel I should be qualified to answer
this but I don't understand the question...  Maybe an example would

--Guido van Rossum (home page: http://www.python.org/~guido/)