完整的Python参考

时间:2015-02-04 08:40:03

标签: python

Python语言是否在某处具有可靠的参考页面。例如,我想检查Python.Test.Client类 - 请参阅其方法和字段。

我找到的唯一参考是https://docs.python.org/2/library/index.html

但它并不包含有关客户的信息。

可能有人可以分享他们使用的来源。

1 个答案:

答案 0 :(得分:3)

我会尝试IPython进行探索。 你可以在那里做以下事情:

In [1]: import unittest
In [2]: unittest?

哪个会给你输出

Type:        module
String form: <module 'unittest' from '/usr/lib/python2.7/unittest/__init__.pyc'>
File:        /usr/lib/python2.7/unittest/__init__.py
Docstring:
Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's
Smalltalk testing framework.

This module contains the core framework classes that form the basis of
specific test cases and suites (TestCase, TestSuite etc.), and also a
text-based utility class for running the tests and reporting the results
 (TextTestRunner).

Simple usage:
...

如果您追加??而不是?,您甚至可以获得更多信息。 如果您仍然不满意,可以直接查看源代码,因为您可以看到有问题的函数/模块/类位于输出顶部的文件。

选项卡完成也很好,你应该试试:))