Finding Python help...

Cameron Laird claird at
Mon Mar 31 16:31:52 CEST 2003

In article <pan.2003. at>,
Neal Norwitz  <neal at> wrote:
>On Mon, 31 Mar 2003 07:14:07 -0500, Steve Cassidy wrote:
>> Another problem, how do I find out what methods are defined on a type
>> like list? Again,  I end up in the tutorial trying to find relevant
>> docs.
>>>> dir([])
>Don't forget about docstrings too:
>>>> print [].__doc__
>list() -> new list
>list(sequence) -> new list initialized from sequence's items
>>>> print [].append.__doc__
>L.append(object) -- append object to end

I thought of most interest to Steve would be
  >>> dir(list)
  ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__',
   '__delslice__', '__doc__', '__eq__', '__ge__', '__getattribute__',
   '__getitem__', '__getslice__', '__gt__', '__hash__', '__iadd__',
   '__imul__', '__init__', '__le__', '__len__', '__lt__', '__mul__',
   '__ne__', '__new__', '__reduce__', '__repr__', '__rmul__',
   '__setattr__', '__setitem__', '__setslice__', '__str__', 'append',
   'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']

Cameron Laird <Cameron at>

More information about the Python-list mailing list