組み込み関数 help

組み込み関数 help を利用すると、次のように、

>>> help(file)
Help on class file in module __builtin__:
...

組み込み型 file に関する「すべて」のヘルプ情報が出力されます。しかし、得られた情報は、ときに冗長に感じることがあります。そこで、次のようにすると、

>>> help(file.readlines)
Help on method_descriptor:

readlines(...)
readlines([size]) -> list of strings, each a line from the file.

Call readline() repeatedly and return a list of the lines so read.
The optional size argument, if given, is an approximate bound on the
total number of bytes in the lines returned.

メソッド file.readlines に関する「個別」のヘルプ情報が得られます。