This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
from inspect import ismethod | |
class PersistentDecorator(object): | |
def __init__(self, decorated_object, save): | |
self._decorated_object = decorated_object | |
self._save = save | |
def __getattribute__(self, attr): |