Document FrameLocalsProxy behaviour quirks
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Following PEP 667, https://docs.python.org/dev/reference/datamodel.html#frame-objects mentions that frame.f_locals may be a write-through proxy object, but doesn't really explain what that means.
Once https://github.com/python/peps/pull/3845 lands PEP 667 will contain such a description, but the main docs should at least cover the key behaviours:
- new instance on every attribute access
- two proxies with the same keys and values will still be unequal if they refer to different frames
- extra keys can be stored and are stored on the frame itself so they're shared across all proxies for the same frame
- keys corresponding to local variables can't be deleted
.copy()(and any other API that produces a new container) returns a regulardictinstance
Suggested location would be as a new 4th subsection under the frame objects section linked above. A "see also" from that new subsection back to PEP 667 would also be a useful addition.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Python データモデルのドキュメントにある frame オブジェクトのセクションから始め、リンクされている PEP の pull request を含めて PEP 667 を確認します。FrameLocalsProxy の列挙された 5 つの動作を説明する 4 番目のサブセクションと、PEP 667 への See also リンクを追加します。メインドキュメントで、プロキシの同一性、共有される追加キー、削除できないローカル変数、dict を生成する API が説明されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 活発
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 88/100