wuwei23 at gmail.com
Tue Aug 7 04:09:49 CEST 2012
On Aug 7, 10:35 am, Steven D'Aprano <st... at pearwood.info> wrote:
> I don't know that I accept that abstract classes are documentation. It seems
> to me that to be documentation, it has to be, well, documentation. Not a class
> hierarchy. The documentation might include the fact that something is an
> abstract class, but merely making something an abstract class is not in and of
> itself documentation.
Why not? What could I say here in textual documentation that isn't
made obvious by declaring the interface?
"""Interface for setting up, updating & deleting objects for
__metaclass__ = abc.ABCMeta
"""Get the object ready for use"""
"""Modify the object to reflect recent changes"""
"""Remove the object"""
Good code _is_ documentation.
More information about the Python-ideas