Commits

Jonathan Eunice committed 9e06ac9

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

Comments (0)

Files changed (2)

 
 setup(
     name='simplere',
-    version='0.24',
+    version='0.25',
     author='Jonathan Eunice',
     author_email='jonathan.eunice@gmail.com',
     description='Simpler, cleaner access to regular expressions. Globs too.',
     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