ipython / ipython/traitlets

Define Notification Types With Sentinels?

Aperta
#387 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
653
Fork
217
Merge medio
2g 21h
PR unite (30g)
2

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.