[Python-ideas] inheriting docstrings and mutable docstings for classes

Steven D'Aprano steve at pearwood.info
Fri Jun 10 14:17:25 CEST 2011


David Stanek wrote:
> On Fri, Jun 10, 2011 at 7:22 AM, Steven D'Aprano <steve at pearwood.info>wrote:
> 
>> David Stanek wrote:
>>> How would a tool know if the behavior of a method changed without
>>> analyzing
>>> the code? I think this could very easily lead to a situation where a
>>> project's generated documentation is incorrect.
>>>
>>
>> That's the developer's problem, and no different from any other case where
>> you inherit data without ensuring it is the correct data.
>>
> 
> This means that a significant amount of existing code may/will have problems
> with this type of change. If Sphinx did this automatically I'm sure there
> would be lots of incorrect documentation. I think the developer should
> explicitly carry over and modify the documentation if necessary.


Oh, I'm sorry if I gave the impression that we should inherit docstrings 
by default. That wasn't my intention. I was merely suggesting that we 
shouldn't let the risk of misuse discourage us from a potential change.


-- 
Steven




More information about the Python-ideas mailing list