Kaydet (Commit) d9636e17 authored tarafından Brett Cannon's avatar Brett Cannon

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

üst 33ede08c
...@@ -316,7 +316,7 @@ class Scanner: ...@@ -316,7 +316,7 @@ class Scanner:
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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment