Ejemplo n.º 1
0
	def find(self, caller):
		sign = Signature.createFromCall(caller)
		weights = []
		for fn in self.items:
			curWeight = sign.match(fn)
			if curWeight:
				weights.append((curWeight, fn))
		if len(weights) == 0:
			self.throwError('Cant match call of '+self.getPath()+' '+str(sign))
		weights.sort()
		if len(weights) > 2 and weights[0][0] == weights[1][0]:
			self.throwError('Too many matches for '+self.getPath()+' '+str(sign))
		return weights[0][1]
Ejemplo n.º 2
0
 def find(self, caller):
     sign = Signature.createFromCall(caller)
     return self.findSignature(sign)