Receive a scalar set event. :param target: the object instance receiving the event. If the listener is registered with ``raw=True``, this will be the :class:`.InstanceState` object. :param value: the value being set. If this listener is registered with
(
self, target: _O, value: _T, oldvalue: _T, initiator: Event
)
| 2755 | """ |
| 2756 | |
| 2757 | def set( |
| 2758 | self, target: _O, value: _T, oldvalue: _T, initiator: Event |
| 2759 | ) -> None: |
| 2760 | """Receive a scalar set event. |
| 2761 | |
| 2762 | :param target: the object instance receiving the event. |
| 2763 | If the listener is registered with ``raw=True``, this will |
| 2764 | be the :class:`.InstanceState` object. |
| 2765 | :param value: the value being set. If this listener |
| 2766 | is registered with ``retval=True``, the listener |
| 2767 | function must return this value, or a new value which |
| 2768 | replaces it. |
| 2769 | :param oldvalue: the previous value being replaced. This |
| 2770 | may also be the symbol ``NEVER_SET`` or ``NO_VALUE``. |
| 2771 | If the listener is registered with ``active_history=True``, |
| 2772 | the previous value of the attribute will be loaded from |
| 2773 | the database if the existing value is currently unloaded |
| 2774 | or expired. |
| 2775 | :param initiator: An instance of :class:`.attributes.Event` |
| 2776 | representing the initiation of the event. May be modified |
| 2777 | from its original value by backref handlers in order to control |
| 2778 | chained event propagation. |
| 2779 | |
| 2780 | :return: if the event was registered with ``retval=True``, |
| 2781 | the given value, or a new effective value, should be returned. |
| 2782 | |
| 2783 | .. seealso:: |
| 2784 | |
| 2785 | :class:`.AttributeEvents` - background on listener options such |
| 2786 | as propagation to subclasses. |
| 2787 | |
| 2788 | """ |
| 2789 | |
| 2790 | def init_scalar( |
| 2791 | self, target: _O, value: _T, dict_: Dict[Any, Any] |
no outgoing calls
no test coverage detected