Why are they? Re: Module Documentation Strings

Tim Peters tim_one at email.msn.com
Sun Apr 4 03:15:50 EDT 1999


[Jeff "evil Japh" Pinyan]
> Why are there documentation strings? ... why not just use
> comment lines?

D:\Python>python
Python 1.5.2b2 (#0, Feb 16 1999, 17:09:09) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> dir([])
['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove',
 'reverse', 'sort']
>>> print [].pop.__doc__
[].pop([index]) -> item -- remove and return item at index (default last)
>>>

Comments aren't available for introspection or interactive use.

that's-all-ly y'rs  - tim






More information about the Python-list mailing list