Ok, I rethink the solucion with the dummy class and it would be better:
class Dummy:
def __init__(self, group, name):
self.group = group
self.name = name
records = []
record = Dummy('some_group','some_name')
records.append(record)
record = Dummy('other_group','other_name')
records.append(record)
manage_addLexicon(catalog,'Lexicon',elements=records)
It looks better than my initial solution. However, I don't see
nice that each zope developer interested in using the manage_addLexicon has to define this class.
Ok, I rethink the solucion with the dummy class and it would be better:
class Dummy:
def __init__(self, group, name):
self.group = group
self.name = name
records = [] some_group' ,'some_ name') append( record)
record = Dummy('
records.
record = Dummy(' other_group' ,'other_ name') append( record) addLexicon( catalog, 'Lexicon' ,elements= records)
records.
manage_
It looks better than my initial solution. However, I don't see
nice that each zope developer interested in using the manage_addLexicon has to define this class.