[pypy-commit] pypy default: docstring for Method
bdkearns
noreply at buildbot.pypy.org
Fri Aug 29 01:46:00 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r73130:45d3cb1cdc8c
Date: 2014-08-28 19:44 -0400
http://bitbucket.org/pypy/pypy/changeset/45d3cb1cdc8c/
Log: docstring for Method
diff --git a/pypy/interpreter/test/test_typedef.py b/pypy/interpreter/test/test_typedef.py
--- a/pypy/interpreter/test/test_typedef.py
+++ b/pypy/interpreter/test/test_typedef.py
@@ -379,6 +379,7 @@
assert bm.im_class is B
assert bm.__doc__ == "aaa"
assert bm.x == 3
+ assert type(bm).__doc__ == "instancemethod(function, instance, class)\n\nCreate an instance method object."
raises(AttributeError, setattr, bm, 'x', 15)
l = []
assert l.append.__self__ is l
diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py
--- a/pypy/interpreter/typedef.py
+++ b/pypy/interpreter/typedef.py
@@ -833,6 +833,7 @@
__repr__ = interp2app(Method.descr_method_repr),
__reduce__ = interp2app(Method.descr_method__reduce__),
__weakref__ = make_weakref_descr(Method),
+ __doc__ = """instancemethod(function, instance, class)\n\nCreate an instance method object."""
)
Method.typedef.acceptable_as_base_class = False
More information about the pypy-commit
mailing list