python/dist/src/Lib UserList.py,1.20,1.21
![](https://secure.gravatar.com/avatar/7b43f399ad17706bee01be8cd20165b0.jpg?s=120&d=mm&r=g)
Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv6236/Lib Modified Files: UserList.py Log Message: Add list.sorted() classmethod. Index: UserList.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/UserList.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** UserList.py 16 Oct 2003 05:53:16 -0000 1.20 --- UserList.py 29 Oct 2003 06:54:42 -0000 1.21 *************** *** 79,82 **** --- 79,87 ---- def reverse(self): self.data.reverse() def sort(self, *args, **kwds): self.data.sort(*args, **kwds) + def sorted(cls, iterable, *args, **kwds): + s = cls(iterable) + s.sort(*args, **kwds) + return s + sorted = classmethod(sorted) def extend(self, other): if isinstance(other, UserList):
participants (1)
-
rhettingerīŧ users.sourceforge.net