def getDefault(self, key, context=None):
        #print "getting default for key", key, self.defaults
        # 1) Check on the request
        current = self.defaults.get(key, None)
        if current is None:
            # 2) Check on the session
            if context is not None:
                sessionDefaults = context.locate(iformless.IFormDefaults)
                if sessionDefaults is not self:
                    current = sessionDefaults.getDefault(key)
                    if current is not None:
                        return current
                # 3) Ask the Binding instance for the default values
                try:
                    configurable = context.locate(iformless.IConfigurable)
                except __HOLE__:
                    return ''
                return configurable.getDefault(context.locate(inevow.IData))
        return current
dataset/ETHPy150Open twisted/nevow/formless/formutils.py/FormDefaults.getDefault