Reorganize `os.path` documentation
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
The os.path documentation is alphabetically sorted. That's great because it's easy to find a function. However, this also means that functions shouldn't reference other functions documented later as the reader may not have been aware of them before.
An alternative is to reorganize the documentation page so that we put at the top the most used functions such as os.path.join. The latter caused a bit of confusion in gh-130527, where neither the OP nor me remembered that os.path.join("/a", "/b") == "/b".
If reorganizing the documentation is not preferred, we should at least add .. seealso:: directives and clickable links so that any function mentioned but not yet documented at the time of reading can be easily looked up.
- os.path.abspath contains a reference to
os.path.joinwithout a link. - os.path.isabs could backlink to
os.path.abspath. - os.path.split mentions
os.path.joinbut as it's far away, we could backlink it. - os.path.join mentions "If a segment is an absolute path (which on Windows requires both a drive and a root), then all previous segments are ignored and joining continues from the absolute path segment.". We should add an example as it would be more explicit and teaching (e.g.,
os.path.join("/home/foo", "/home/bar") == "/home/bar".
Linked PRs
- gh-130557
- gh-131872
- gh-132408
- gh-142800
- gh-142801
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
os.path のドキュメントページから始め、issue に記載されている abspath、isabs、split、join の各項目を確認してください。始める前にリンクされている PR を確認し、そのうえで、採用された方向性が再編成なのか、seealso リンクと例の追加なのかを判断してください。選択した参照先が追いやすく、絶対パスに対する join の動作が明示的に説明されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100