Add support for firing one-time events when observing
Offen
- Vorherrschende Sprache
- Python
- Sterne
- 653
- Forks
- 217
- Ø Merge
- 2 T. 21 Std.
- Gemergte PRs (30 T.)
- 2
Beschreibung
I have a frequent pattern that comes up time and again with my jupyter widgets (depends on traitlets) and think it would be helpful to have this supported in the API:
```
append_type_radio.observe(toggle_append_type, names='value');
toggle_append_type({'new': toggle_append_radio.value}) # call it once to initialize
```
^-- the above is a hack and I would much prefer a way to have a signal automatically come when subscribing (i.e. eager execution)
or, optionally, a way to manually trigger an event, so that anything that depends on initial state can get updated.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.