def __init__(self, class_, key,
                 callable_, dispatch, trackparent=False, extension=None,
                 compare_function=None, active_history=False,
                 parent_token=None, expire_missing=True,
                 send_modified_events=True,
                 **kwargs):
        self.class_ = class_
        self.key = key
        self.callable_ = callable_
        self.dispatch = dispatch
        self.trackparent = trackparent
        self.parent_token = parent_token or self
        self.send_modified_events = send_modified_events
        if compare_function is None:
            self.is_equal = operator.eq
        else:
            self.is_equal = compare_function

        # TODO: pass in the manager here
        # instead of doing a lookup
        attr = manager_of_class(class_)[key]

        for ext in util.to_list(extension or []):
            ext._adapt_listener(attr, ext)

        if active_history:
            self.dispatch._active_history = True

        self.expire_missing = expire_missing
Construct an AttributeImpl.
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py/AttributeImpl.__init__