[Python-checkins] r65506 - python/trunk/Lib/re.py
brett.cannon
python-checkins at python.org
Mon Aug 4 23:08:00 CEST 2008
Author: brett.cannon
Date: Mon Aug 4 23:07:59 2008
New Revision: 65506
Log:
Remove the use of callable() in re to silence warnings under -3.
Modified:
python/trunk/Lib/re.py
Modified: python/trunk/Lib/re.py
==============================================================================
--- python/trunk/Lib/re.py (original)
+++ python/trunk/Lib/re.py Mon Aug 4 23:07:59 2008
@@ -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:
More information about the Python-checkins
mailing list