Author: Simon Sapin <[email protected]>
Branch:
Changeset: r1102:caad797a6b3d
Date: 2012-12-27 17:11 +0100
http://bitbucket.org/cffi/cffi/changeset/caad797a6b3d/
Log: Fix Python 3.1 compat (callable)
diff --git a/cffi/api.py b/cffi/api.py
--- a/cffi/api.py
+++ b/cffi/api.py
@@ -1,5 +1,13 @@
import types
+try:
+ callable
+except NameError:
+ # Python 3.1
+ from collections import Callable
+ callable = lambda x: isinstance(x, Callable)
+
+
class FFIError(Exception):
pass
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit