[pypy-commit] pypy default: Document @builtinify

arigo pypy.commits at gmail.com
Sun May 15 02:41:55 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r84446:14588815a44a
Date: 2016-05-15 08:42 +0200
http://bitbucket.org/pypy/pypy/changeset/14588815a44a/

Log:	Document @builtinify

diff --git a/pypy/module/__pypy__/interp_magic.py b/pypy/module/__pypy__/interp_magic.py
--- a/pypy/module/__pypy__/interp_magic.py
+++ b/pypy/module/__pypy__/interp_magic.py
@@ -51,6 +51,11 @@
                            space.newint(cache.misses.get(name, 0))])
 
 def builtinify(space, w_func):
+    """To implement at app-level modules that are, in CPython,
+    implemented in C: this decorator protects a function from being ever
+    bound like a method.  Useful because some tests do things like put
+    a "built-in" function on a class and access it via the instance.
+    """
     from pypy.interpreter.function import Function, BuiltinFunction
     func = space.interp_w(Function, w_func)
     bltn = BuiltinFunction(func)


More information about the pypy-commit mailing list