Undocumented method for "slice" class
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 25/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
issue にリンクされている slice クラスの Python ドキュメントページから始め、メソッドがどのようにドキュメント化されているかを確認します。length 引数、返されるタプル、動作例を含めて slice.indices() のドキュメントを追加します。クラスと並べてこのメソッドが説明され、例が正確であれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Documentation
The "slice" class has a method "indices" that, when given a length of a sequence, will return a tuple with (start, stop, step) that is adjusted for the length of that sequence. This method is completely undocumented
For example,
x=slice(0, 10, -2)
x.indices(5) #This returns (0, 4, -2)
x.indices(10) #This returns (0, 9, -2)
x.indices(100) #This returns (0, 9, -2)
The only example that I could find in any official Python documents is this, there is a single reference to this method at the bottom of the page. However, as of the lastest version of Python, which is 3.11.0 at the time of writing, using this method in a standard installation of CPython still works.
- PR: gh-99129
- 主要言語
- 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
-
難易度 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100