From d9636e17ccfd83bd0f7d7316aeb30d98a0a8cb07 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 4 Aug 2008 21:07:59 +0000 Subject: Remove the use of callable() in re to silence warnings under -3. --- Lib/re.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/re.py b/Lib/re.py index 1d9c987..ee962bb 100644 --- a/Lib/re.py +++ b/Lib/re.py @@ -316,7 +316,7 @@ class Scanner: if i == j: break action = self.lexicon[m.lastindex-1][1] - if callable(action): + if hasattr(action, '__call__'): self.match = m action = action(self, m.group()) if action is not None: -- cgit v0.12