class Meta(type):

    def __new__(cls, name, bases, attrs):
        attrs['_doc'] = attrs.get('__doc__', '')
return super(Meta, cls).__new__(cls, name, bases, attrs)

@property
def __doc__(self):
    return self._doc + self.attributes_string()
How to modify class docstrings using classmethods