Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

Many docstrings are only 1 line without being "See base class." And many 
docstrings are multiple lines while also referring the reader to see the parent 
class for further details. So this DWIM heuristic to guess whether or not to 
display a parent class docstring will have a lot of both false positives and 
false negatives.

The false negatives just revert to the status quo, but the false positives will 
be annoying.

I am leery of DWIM code. The reader should be capable of recognising that sort 
of message and calling up help for that class, so I think the benefit here is 
minimal and the failures common.

But if we do go ahead with this, I have a style issue.

At the moment, getdoc shadows `object`, for no good purpose. (I'm fine with 
shadowing builtins if there is a good reason.) This is a minor issue that is 
not worth fixing on its own, but if you do end up touching getdoc to implement 
this, could you please remove the unnecessary shadowing? If we can call the 
function "get *doc*" we can call the parameter *obj* :-)

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46349>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to