[Twisted-web] getBinding missing action?
twisted-web@twistedmatrix.com
twisted-web@twistedmatrix.com
Sun, 18 Jan 2004 17:08:42 +0200
exploring the getBinding() method in nevow/freeform.py
i can't understand the following code lines ..
to me its seems there is a missing assignment in the lines marked with (*) can anyone figure what the developer intention was?
def getBinding(self, context, name):
??? *** if self.bindingDict is None:
??? *** self.getBindingNames(context)
??? if self.bindingDict is None:
??? self.bindingDict = {}
binding = getattr(self, 'bind_%s' % name, getattr(self.boundTo, 'bind_%s' % name, None))
print "-- self.boundTo --" , self.boundTo
if binding is not None:
binding = binding(context)
else:
try:
binding = self.bindingDict[name]
except KeyError:
raise ImproperInputError, name
binding.boundTo = self.boundTo
return binding