Add a "warning" option to enum.FlagBoundary
オープン
@ethanfurman がすでに取り組んでいます。
2022年12月5日 から。
stdlib
type-feature
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
Feature or enhancement
The new enum.FlagBoundary system seems quite nice, but there does not appear to be an option to accept a value (a.k.a KEEP) but warn when out of range (STRICT throws an error, and would require a second class to wrap the value).
Pitch
I see two possible options:
- Add a new flag (e.g.
WARNorWARN_KEEP) which warns when the value is out of range - Modify
KEEPsuch that a warning is displayed when the value is out of range
(1) seems like the better option from a backwards-compatibility perspective, but (2) seems like the better option from a usability and maintenance perspective (as missing values are easier to spot).
Previous discussion
None
Linked PRs
- gh-154501
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。