Closes #13258: Use callable() built-in in the standard library.

This commit is contained in:
Florent Xicluna 2011-10-28 14:45:05 +02:00
parent f99e4b5dbe
commit 5d1155c08e
25 changed files with 48 additions and 51 deletions

View file

@ -326,7 +326,7 @@ class Scanner:
if i == j:
break
action = self.lexicon[m.lastindex-1][1]
if hasattr(action, "__call__"):
if callable(action):
self.match = m
action = action(self, m.group())
if action is not None: