# HG changeset patch # User Oleg Oshmyan # Date 1293484467 -7200 # Node ID e00ab6d1f0baee1d700459cb8b3863e9b1702d31 # Parent e0f8b28e15b58b154e08065e046347ede06abd03 Corrected the implementation of callable() for Python 3.0 and 3.1 diff -r e0f8b28e15b5 -r e00ab6d1f0ba compat.py --- a/compat.py Sun Dec 26 20:36:59 2010 +0200 +++ b/compat.py Mon Dec 27 23:14:27 2010 +0200 @@ -163,7 +163,8 @@ try: callable = callable except NameError: - callable = lambda obj: hasattr(obj, '__call__') + from collections import Callable + callable = lambda obj: isinstance(obj, Callable) try: next = next