Commits

Philip Jenvey committed 0eaadba

func_code -> __code__

Comments (0)

Files changed (1)

lib-python/3.2/inspect.py

     and 'varkw' are the names of the * and ** arguments or None."""
 
     if not iscode(co):
-        if hasattr(len, 'func_code') and type(co) is type(len.func_code):
+        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.