[pypy-commit] pypy default: another docstring for listobject

bdkearns noreply at buildbot.pypy.org
Fri Aug 29 00:12:43 CEST 2014


Author: Brian Kearns <bdkearns at gmail.com>
Branch: 
Changeset: r73126:117bce1f2cea
Date: 2014-08-28 18:12 -0400
http://bitbucket.org/pypy/pypy/changeset/117bce1f2cea/

Log:	another docstring for listobject

diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -364,6 +364,7 @@
         return w_obj
 
     def descr_init(self, space, __args__):
+        """x.__init__(...) initializes x; see help(type(x)) for signature"""
         # this is on the silly side
         w_iterable, = __args__.parse_obj(
                 None, 'list', init_signature, init_defaults)
diff --git a/pypy/objspace/std/test/test_listobject.py b/pypy/objspace/std/test/test_listobject.py
--- a/pypy/objspace/std/test/test_listobject.py
+++ b/pypy/objspace/std/test/test_listobject.py
@@ -444,6 +444,7 @@
     def test_doc(self):
         assert list.__doc__ == "list() -> new empty list\nlist(iterable) -> new list initialized from iterable's items"
         assert list.__new__.__doc__ == "T.__new__(S, ...) -> a new object with type S, a subtype of T"
+        assert list.__init__.__doc__ == "x.__init__(...) initializes x; see help(type(x)) for signature"
 
     def test_getstrategyfromlist_w(self):
         l0 = ["a", "2", "a", True]


More information about the pypy-commit mailing list