1. Jonathan Eunice
  2. simplere


Jonathan Eunice  committed 9e06ac9

changed function test to hasattr(f,"__call__")

  • Participants
  • Parent commits e97a1da
  • Branches default

Comments (0)

Files changed (2)

File setup.py

View file
-    version='0.24',
+    version='0.25',
     author='Jonathan Eunice',
     description='Simpler, cleaner access to regular expressions. Globs too.',

File simplere/core.py

View file
     wraps each of those with a ReMatch proxy. If not a function (ie, probably
     a string, then just return it.)
-    if not is_function(f):
+    if not hasattr(f, '__call__'):
         return f
     def regrouped_fn(match):
-        re_match = ReMatch(match)
-        return f(re_match)
+        return f(ReMatch(match))
     return regrouped_fn