- the process of attaching attributes to the class, which are implemented as Python descriptors (this link is mentioned in this sentence), so that any attribute get, set, or delete the operation, that is:
# __get__ print myobject.someattribute
... will invoke Python code for each event, and not use the default Python behavior for direct access / control myobject.__dict__ . SQLAlchemy uses these hooks to provide behaviors such as lazy loading , and also to write when the attribute value changes in order to implement a unit of work where only those elements that have been changed are inserted into UPDATE statements that should be sent to the database upon reset .
source share