ipython / ipython/traitlets

Define Notification Types With Sentinels?

未关闭
#387 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
653
派生
217
平均合并
2 天 21 小时
30 天内合并 PR
2

描述

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.

贡献指南

打开贡献指南

调研方向

Start by reading the notification and notifier behavior described in the issue, then review the linked EventReport pull request for the proposed event types. Compare the two suggested approaches and determine how notification matching should work for sentinel types. Done means the behavior is specified and implemented with coverage for a general change notification catching a special change.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
backend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。