[Python-Dev] __doc__ regression
solipsis at pitrou.net
Tue Feb 4 13:17:59 CET 2014
Following the previous clinic thread, I realize that the latest
signature improvements actually entail a regression in __doc__.
$ ./python -c "print(dict.fromkeys.__doc__)"
Returns a new dict with keys from iterable and values equal to value.
$ python3.3 -c "print(dict.fromkeys.__doc__)"
New dict with keys from S and values equal to v. v defaults to None.
As you see the signature string has vanished from the __doc__ contents.
This means that any tool directly processing __doc__ attributes to
generate (e.g.) automatic API docs will produce less useful docs.
I think the signature should be restored, and a smarter way of
reconciling __doc__ and the signature for help() should be found.
More information about the Python-Dev