def attribute ( func ) : attr = abc . abstractmethod ( func ) attr . __iattribute__ = True attr = _property ( attr ) return attr
python decorate an instance method
Wrap a function as an attribute .
def attribute(func):
    """Wrap a function as an attribute."""
    attr = abc.abstractmethod(func)
    attr.__iattribute__ = True
    attr = _property(attr)
    return attr