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

Jeremy Hylton jeremy@zope.com
Wed, 15 Aug 2001 12:06:25 -0400 (EDT)

>>>>> "SM" == Skip Montanaro <skip@pobox.com> writes:

  SM> In thinking about the implementation of TRACK_GLOBAL some more,
  SM> I'm trying to figure out where object updating is going to take
  SM> place.  Is PyObject_GenericSetAttr the only way C-based objects
  SM> should set attributes?

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

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?