delay_callback¶
- class echo.delay_callback(instance, *props)[source]¶
Bases:
object
Delay any callback functions from one or more callback properties
This is a context manager. Within the context block, no callbacks will be issued. Each callback will be called once on exit
- Parameters
- instance
An instance object with callback properties
- *propsstr
One or more properties within instance to delay
Examples
with delay_callback(foo, 'bar', 'baz'): f.bar = 20 f.baz = 30 f.bar = 10 print('done') # callbacks triggered at this point, if needed
Attributes Summary
Attributes Documentation
- delay_count = {}¶
- old_values = {}¶