Mercurial > ~astiob > upreckon > hgweb
diff compat.py @ 68:e00ab6d1f0ba
Corrected the implementation of callable() for Python 3.0 and 3.1
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Mon, 27 Dec 2010 23:14:27 +0200 |
parents | e0f8b28e15b5 |
children | b9d5857f7b9a |
line wrap: on
line diff
--- 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