summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/interfaces.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/orm/interfaces.py')
-rw-r--r--lib/sqlalchemy/orm/interfaces.py23
1 files changed, 20 insertions, 3 deletions
diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py
index 6dd2225c8..495d22be1 100644
--- a/lib/sqlalchemy/orm/interfaces.py
+++ b/lib/sqlalchemy/orm/interfaces.py
@@ -705,18 +705,35 @@ class AttributeExtension(object):
"""An event handler for individual attribute change events.
AttributeExtension is assembled within the descriptors associated
- with a mapped class.
+ with a mapped class.
"""
def append(self, state, value, initiator):
- pass
+ """Receive a collection append event.
+
+ The returned value will be used as the actual value to be
+ appended.
+
+ """
+ return value
def remove(self, state, value, initiator):
+ """Receive a remove event.
+
+ No return value is defined.
+
+ """
pass
def set(self, state, value, oldvalue, initiator):
- pass
+ """Receive a set event.
+
+ The returned value will be used as the actual value to be
+ set.
+
+ """
+ return value
class StrategizedOption(PropertyOption):