object doesn't have an __enter__/__exit__ yet docs say it does
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 48/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
Issue にリンクされている、object.enter と object.exit に関する Python データモデルのドキュメントセクションから始め、Python 3.10.3 に照らして現在の文言を確認します。これらのメソッドは object に定義されていないことを明確にし、コンテキストマネージャーオブジェクトがインターフェースを提供するためにこれらを定義することを説明するよう、ドキュメントを更新します。ドキュメントに記載された動作が実行時の動作と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Documentation
Here's the current docs in the Python data model on object.__enter__:
object.__enter__(self)
And object.__exit__:
object.__exit__(self, exc_type, exc_value, traceback)
However, with Python 3.10.3, we see neither of these methods belong to object:
>>> object.__enter__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'object' has no attribute '__enter__'. Did you mean: '__ne__'?
>>> object.__exit__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'object' has no attribute '__exit__'. Did you mean: '__init__'?
I think the docs could be:
- More clear that
__enter__and__exit__are not methods onobject - Mention where they come from (just being defined within your object to match the interface)
Thank you for your consideration!
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 558
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python/cpython のほかの issue
-
docs pending
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
stdlib type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
stdlib type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
build type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
stdlib topic-email type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
似ている issue
-
area/auth bug comp/agent P3 platform/discord type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#117848 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
bancolombia/sentinel#23 ·
-
test md オープンCI
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/deepagents#6450 ·
-
bug client
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100