Guido grants a Christmas wish:

sorted() becomes a regular function instead of a classmethod.
This commit is contained in:
Raymond Hettinger 2003-12-17 20:43:33 +00:00
parent df38ea9c29
commit 64958a15d7
15 changed files with 120 additions and 138 deletions

View file

@ -886,6 +886,15 @@ class C(object):
\samp{a[start:stop, i]}.
\end{funcdesc}
\begin{funcdesc}{sorted(\var{iterable}\optional{, \var{cmp}=None
\optional{, \var{key}=None
\optional{, \var{reverse}=False}}})}
Return a new sorted list from the items in \var{iterable}.
The optional arguments \var{cmp}, \var{key}, and \var{reverse}
have the same meaning as those for the \method{list.sort()} method.
\versionadded{2.4}
\end{funcdesc}
\begin{funcdesc}{staticmethod}{function}
Return a static method for \var{function}.