Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r60330:dfc05d1615c3
Date: 2013-01-21 14:33 -0800
http://bitbucket.org/pypy/pypy/changeset/dfc05d1615c3/

Log:    oops, more func_code -> __code__ (thanks amaury)

diff --git a/lib-python/3.2/inspect.py b/lib-python/3.2/inspect.py
--- a/lib-python/3.2/inspect.py
+++ b/lib-python/3.2/inspect.py
@@ -767,10 +767,10 @@
     and 'varkw' are the names of the * and ** arguments or None."""
 
     if not iscode(co):
-        if hasattr(len, '__code__') and type(co) is type(len.func_code):
-            # PyPy extension: built-in function objects have a func_code too.
-            # There is no co_code on it, but co_argcount and co_varnames and
-            # co_flags are present.
+        if hasattr(len, '__code__') and type(co) is type(len.__code__):
+            # PyPy extension: built-in function objects have a __code__
+            # too.  There is no co_code on it, but co_argcount and
+            # co_varnames and co_flags are present.
             pass
         else:
             raise TypeError('{!r} is not a code object'.format(co))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to