Re: Where are list methods documented?
Nick Craig-Wood wrote:
[color=blue]
> Since I'm a unix person, I would have typed
>
> pydoc -k sort
>
> But it doesn't come up with anything useful :-([/color]
FYI, you can get this info using the not-very-intuitive
pydoc __builtin__.lis t.sort
e.g.
(C:\Python23\Li b) $ pydoc __builtin__.lis t.sort
Help on method_descript or in __builtin__.lis t:
__builtin__.lis t.sort = sort(...)
L.sort(cmpfunc= None) -- stable sort *IN PLACE*; cmpfunc(x, y) ->
-1, 0, 1
(Rather terse...)
Info on the sort function (together with all the other list methods) is
also available if you do
pydoc list
....but for some reason, "pydoc list.sort" doesn't work on my machine
(Python 2.3.4, Windows XP).
--
Hans Nowak
Nick Craig-Wood wrote:
[color=blue]
> Since I'm a unix person, I would have typed
>
> pydoc -k sort
>
> But it doesn't come up with anything useful :-([/color]
FYI, you can get this info using the not-very-intuitive
pydoc __builtin__.lis t.sort
e.g.
(C:\Python23\Li b) $ pydoc __builtin__.lis t.sort
Help on method_descript or in __builtin__.lis t:
__builtin__.lis t.sort = sort(...)
L.sort(cmpfunc= None) -- stable sort *IN PLACE*; cmpfunc(x, y) ->
-1, 0, 1
(Rather terse...)
Info on the sort function (together with all the other list methods) is
also available if you do
pydoc list
....but for some reason, "pydoc list.sort" doesn't work on my machine
(Python 2.3.4, Windows XP).
--
Hans Nowak
Comment