3

每当我使用help()一种方法时,我都会得到一个看起来很奇怪的输出。例如,help(obj.readline)给我以下输出:

Help on built-in function readline:

readline(...)

这就是我所得到的。我不知道怎么解释。为什么没有关于方法的描述?有人可以向我解释发生了什么吗?

4

1 回答 1

3

这是奇怪的输出吗?

>>> f = open('data.txt')
>>> help(f.readline)
Help on built-in function readline:

readline(...)
    readline([size]) -> next line from the file, as a string.

    Retain newline.  A non-negative size argument limits the maximum
    number of bytes to return (an incomplete line may be returned then).
    Return an empty string at EOF.
于 2013-06-10T06:44:49.417 回答