Author: Armin Rigo <[email protected]>
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)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit