Adding/removing instance members

Ladvánszky Károly aa at bb.cc
Fri Jan 30 09:49:40 EST 2004


I understand instance members can be added to an object in a dynamic manner:

class Cc:
  pass

oCc=Cc()
oCc.x=10    # oCc now has a new member

What is the way to remove these instance members?
Is it possible to add a new member whose name is given by a string?

Thanks on any help,

Károly





More information about the Python-list mailing list