Apply and map function

Nico de Boer nico at nfg.nl
Thu Jul 18 05:58:13 EDT 2002


Hi all,

I want to implement the apply or map function into the following code:

        initmethods = InitMethods()
        methods = {
            'SiteNav_OpenTreeLevel': initmethods.init_opentreelevel(),
            'SiteNav_LinkTreeItem': initmethods.init_linktreeitem(),
            'SiteNav_ActiveTreeItem': initmethods.init_activetreeitem(),
            'SiteNav_CloseTreeLevel': initmethods.init_closetreelevel(),
            'local_css': initmethods.init_localcss()
            }
        for (methodname,method) in methods.items():
            self.createDTMLMethod(methodname, '',method)

Self.createDTMLMethods is a function that creates Zope DTML Methods.
I can't find out how to implement one of these functions.

Can somebody help me out?

Thanks,

Greetz Nico






More information about the Python-list mailing list