David Stanek wrote:
On Fri, Jun 10, 2011 at 3:04 AM, Greg Ewing
wrote: Maybe the best thing would be for the inherited docstring to get put into a different property, such as __basedoc__. Then tools that examine docstrings can decide for themselves whether using inherited docstrings makes sense.
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. class Parrot: colour = 'green' def speak(self): return "Polly wants a cracker." class NorwegianBlue(Parrot): def speak(self): return "I'm pining for the fjords." assert NorwegianBlue().colour == 'blue' # oops! -- Steven