Author: Brian Kearns <[email protected]>
Branch: stdlib-2.7.8
Changeset: r73117:6c8a4e26c1bc
Date: 2014-08-28 14:45 -0400
http://bitbucket.org/pypy/pypy/changeset/6c8a4e26c1bc/
Log: same for list.__new__
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
@@ -358,6 +358,7 @@
@staticmethod
def descr_new(space, w_listtype, __args__):
+ """T.__new__(S, ...) -> a new object with type S, a subtype of T"""
w_obj = space.allocate_instance(W_ListObject, w_listtype)
w_obj.clear(space)
return w_obj
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
@@ -443,6 +443,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"
def test_getstrategyfromlist_w(self):
l0 = ["a", "2", "a", True]
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit