[Zope3-dev] getInterface()'s context parameter

Jean-Marc Orliaguet jmo at ita.chalmers.se
Tue Apr 25 14:59:48 EDT 2006


Hi,

zope.component.getInterface takes a 'context' as a parameter, which is 
unused practically or set to None.

def getInterface(context, id):
    iface = queryInterface(id, None)
    if iface is None:
        raise ComponentLookupError(id)
    return iface

is it a relic from an old API? why not simplify it to getInterface(id) ?

regards
/JM



More information about the Zope3-dev mailing list