Author: Brian Kearns <[email protected]>
Branch: stdlib-2.7.8
Changeset: r73116:50e98deea8f2
Date: 2014-08-28 14:35 -0400
http://bitbucket.org/pypy/pypy/changeset/50e98deea8f2/
Log: fix list's docstring
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
@@ -1830,8 +1830,8 @@
W_ListObject.typedef = StdTypeDef("list",
- __doc__ = """list() -> new list
-list(sequence) -> new list initialized from sequence's items""",
+ __doc__ = """list() -> new empty list
+list(iterable) -> new list initialized from iterable's items""",
__new__ = interp2app(W_ListObject.descr_new),
__init__ = interp2app(W_ListObject.descr_init),
__repr__ = interp2app(W_ListObject.descr_repr),
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
@@ -441,6 +441,9 @@
cls.w_on_arm = cls.space.wrap(platform.machine().startswith('arm'))
cls.w_runappdirect = cls.space.wrap(cls.runappdirect)
+ def test_doc(self):
+ assert list.__doc__ == "list() -> new empty list\nlist(iterable) ->
new list initialized from iterable's items"
+
def test_getstrategyfromlist_w(self):
l0 = ["a", "2", "a", True]
# this raised TypeError on ListStrategies
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit