Frage

Is there a resource that provides quick/easy access to methods and their pydoc's for standard library classes?

E.g. I want to see what are the methods available on the Match class and the associated pydoc descriptions. Starting pydoc -p 8888 is partially helpful .. but does not address this usecase.

Thanks.

War es hilfreich?

Lösung

Specifically for your case, help on the re.MatchObject can be found at http://docs.python.org/2/library/re.html#match-objects for Python 2.x or http://docs.python.org/3/library/re.html#match-objects for Python 3.x.

Additionally, as Mark writes, you can call help on the interactive console. If you don't know how to get to the interactive console, you can just call python or python.exe from the command line without any arguments.

Since you are looking for help on a match object, you can call

>>> m = re.match('a','a')  #example match command
>>> help(m)

Andere Tipps

Try:

>>> import re.match
>>> help(re.match('', '')) 

from the interactive console.

  • Edited to add your specific example.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top