[issue16801] Preserve original representation for integers / floats in docstrings
Terry J. Reedy
report at bugs.python.org
Sat Dec 29 02:26:51 CET 2012
Terry J. Reedy added the comment:
David is correct
>>> dbm.open.__doc__
"Open or create database at path given by *file*.\n\n Optional argument *flag* can be 'r' (default) for read-only access, 'w'\n for read-write access of an existing database, 'c' for read-write access\n to a new or existing database, and 'n' for read-write access to a new\n database.\n\n Note: 'r' and 'w' fail if the database doesn't exist; 'c' creates it\n only if it doesn't exist; and 'n' always creates a new database.\n "
>>> help(dbm.open)
Help on function open in module dbm:
open(file, flag='r', mode=438)
Open or create database at path given by *file*.
...
IDLE tooltip (still using inspect.getfullargspec) also shows
open(file, flag='r', mode=438)
The int comes from dbm.open.__defaults__[1]
438
----------
nosy: +terry.reedy
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16801>
_______________________________________
More information about the Python-bugs-list
mailing list