[Zope] Add new property to a class
Luis Machado
luis.machado@mandioca.tzo.com
01 Mar 2003 13:17:00 -0800
Having defined a class using python like this one:
from OFS import ObjectManager, SimpleItem
class Plant(ObjectManager.ObjectManager, SimpleItem.SimpleItem):
"""A plant"""
def __init__(self, name, responsible):
"Inits the product with default values"
self.name = name
self.responsible = responsible
self.areas = {}
you create a few instances, and later you want to add more properties to
the same class, for example:
def __init__(self, name, responsible, address):
"Inits the product with default values"
self.name = name
self.responsible = responsible
self.areas = {}
self.address = address
Is there a way to programatically modify the existing instances and add
this new property to them.
Any help will be appreciated.
Luis