Remove the use of callable() in re to silence warnings under -3.

This commit is contained in:
Brett Cannon 2008-08-04 21:07:59 +00:00
parent 33ede08cdd
commit d9636e17cc

View file

@ -316,7 +316,7 @@ def scan(self, string):
if i == j: if i == j:
break break
action = self.lexicon[m.lastindex-1][1] action = self.lexicon[m.lastindex-1][1]
if callable(action): if hasattr(action, '__call__'):
self.match = m self.match = m
action = action(self, m.group()) action = action(self, m.group())
if action is not None: if action is not None: