commit | d9636e17ccfd83bd0f7d7316aeb30d98a0a8cb07 | [log] [tgz] |
---|---|---|
author | Brett Cannon <bcannon@gmail.com> | Mon Aug 04 21:07:59 2008 +0000 |
committer | Brett Cannon <bcannon@gmail.com> | Mon Aug 04 21:07:59 2008 +0000 |
tree | 23932a8773f3d9accab1fbcbe63fb8ebdba1b911 | |
parent | 33ede08cdd44f1f98369f969c5533129f890c4f3 [diff] [blame] |
Remove the use of callable() in re to silence warnings under -3.
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 @@ 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: