-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We need to clarify
- the callback signature: probably just
(obj, field)for get and(obj, field, value, has_changed)for set. - should the observer be called in the same thread ? probably yes for now. Later we could imagine using
asyncio.loop.call_soonbut that seems overkill for now - should the observer be called after setting the value in case of a set observer ? Maybe better to support (A) generators with a single yield and (B) normal methods, in which case they will be called after* the field is set.
- the name of the option in
field()and in the associated decorator (like for validators and converters). Maybeget_observersandset_observers(without the 's' for decorator and correspondingadd_xxxmethod) ?
See https://traitlets.readthedocs.io/en/stable/using_traitlets.html#observe and https://python-3-patterns-idioms-test.readthedocs.io/en/latest/Observer.html
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request