Zope: Add, Change, Get - Objekt-Properties
Properties hinzufügen/ändern:
def setProperty(context, property, value, type): if context.hasProperty(property): context.manage_changeProperties({property: value}) else: context.manage_addProperty(property, value, type) property = 'Name' value = 'Tux' type = 'string' setProperty(context, property, value, type)
Properties auslesen:
property = 'Name'
myproperty = context.get(property, none) # oder
myproperty = context.getProperty(property)