python / python/cpython

Docstring of array.array misses 'w' type info and mentions wide/narrow builds

オープン
#142,083 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

docs
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

Documentation

The docstring of array.array at https://github.com/python/cpython/blob/cfcd52490d6531f3b0e8ddd4bb2b40fb6baee854/Modules/arraymodule.c#L2912 has a few mistakes:

  1. in description of 'u' type it mentions the narrow/wide build split that is not a thing since 3.3 - https://docs.python.org/3/whatsnew/3.3.html#functionality
  2. it doesn't mention that since 3.3 the 'u' type is deprecated and 'w' should be used.
  3. it doesn't mention that 'u' type since 3.9 corresponds to wchar_t of C compiler used (so usually 2 byte UTF-16 on Windows, 4 byte UTF-32 elsewhere), instead of to narrow/wide Python build.
  4. it doesn't mention the newer 'w' type that is Python's own Py_UCS4 4 byte UTF-32.

The documentation at https://docs.python.org/3/library/array.html doesn't have these issues, only the docstring (that is shown in help(array.array) in the REPL) does. This is a mismatch between documentation and docstring.

Linked PRs
  • gh-142323

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Issue で参照されている array.array の docstring の周辺を Modules/arraymodule.c で確認し、docs.python.org/3/library/array.html の array ドキュメントと比較します。docstring が 'u' と 'w' の現在の型情報を、obsolete な narrow/wide build に関する記述なしでカバーしていれば完了です。開始する前に、リンクされている PR gh-142323 を確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
c, python
領域
documentation
issue の種類
ドキュメント
難易度
1/5
見積もり時間
1時間未満
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。