ipython / ipython/traitlets

Define Notification Types With Sentinels?

Offen
#387 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
653
Forks
217
Ø Merge
2 T. 21 Std.
Gemergte PRs (30 T.)
2

Beschreibung

A notification which catches a `"change"` should also intuitively catch a `"special change"`.

I see two ways to accomplish this kind of behavior:

1. Split type strings at each `" "` similarly to how html classes are handled by css selectors.
2. Key notifiers on `type(sentinel)` and trace `type(sentinel).mro()` when triggering them.

Either way, I think that we could leverage [`EventReport`](https://github.com/ipython/traitlets/pull/251) types to do this.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.