OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Best practice for documentation for std lib


On 9/23/2013 11:18 AM, Skip Montanaro wrote:
>>> It would be great if the docstring contained a link to the online
>>> documentation.
>>
>> That would have to be a feature of help(), not hardcoded in each docstring.
>
> That *is* a feature of the help function:
>
> Help on built-in module sys:
>
>>>> help(sys)
> NAME
>      sys
>
> FILE
>      (built-in)
>
> MODULE DOCS
>      http://docs.python.org/library/sys

On 3.3.2 and 3.4.0:

Help on built-in module sys:

NAME
     sys

MODULE REFERENCE
     http://docs.python.org/3.3/library/sys
...
FILE
       (built-in)

On Windows, one will not see the top of the help(sys) output unless one 
either uses Idle or increases the number of lines in the console window 
from 300.

-- 
Terry Jan Reedy