2

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.

4

2 回答 2

2

特别针对您的情况,re.MatchObject可以在 http://docs.python.org/2/library/re.html#match-objects for Python 2.x 或http://docs.python.org/3中找到有关帮助/library/re.html#match-objects用于 Python 3.x。

此外,正如 Mark 所写,您可以help在交互式控制台上调用。如果您不知道如何进入交互式控制台,您可以直接从命令行调用python或不带任何参数。python.exe

由于您正在寻找匹配对象的帮助,因此您可以致电

>>> m = re.match('a','a')  #example match command
>>> help(m)
于 2013-06-07T18:05:25.420 回答
0

尝试:

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

从交互式控制台。

  • 编辑以添加您的具体示例。
于 2013-06-07T18:02:59.457 回答