Add list.sorted() classmethod.
diff --git a/Lib/UserList.py b/Lib/UserList.py
index 072f6a7..e8fd356 100644
--- a/Lib/UserList.py
+++ b/Lib/UserList.py
@@ -78,6 +78,11 @@
def index(self, item, *args): return self.data.index(item, *args)
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):
self.data.extend(other.data)