summaryrefslogtreecommitdiffstats
path: root/Lib/re.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-08-04 21:07:59 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-08-04 21:07:59 (GMT)
commitd9636e17ccfd83bd0f7d7316aeb30d98a0a8cb07 (patch)
tree23932a8773f3d9accab1fbcbe63fb8ebdba1b911 /Lib/re.py
parent33ede08cdd44f1f98369f969c5533129f890c4f3 (diff)
downloadcpython-d9636e17ccfd83bd0f7d7316aeb30d98a0a8cb07.zip
cpython-d9636e17ccfd83bd0f7d7316aeb30d98a0a8cb07.tar.gz
cpython-d9636e17ccfd83bd0f7d7316aeb30d98a0a8cb07.tar.bz2
Remove the use of callable() in re to silence warnings under -3.
Diffstat (limited to 'Lib/re.py')
-rw-r--r--Lib/re.py2
1 files changed, 1 insertions, 1 deletions
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: