Author: Brian Kearns <bdkea...@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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit