python / python/cpython

pyexpat: xmlparser is actually XMLParserType

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

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

3.13 3.14 3.15 docs extension-modules topic-XML
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

The type of the Expat parser is referred everywhere as xmlparser, although no anchor for this reference is defined. But this type is actually exposed in the pyexpat (public API is xml.parsers.expat) module as XMLParserType since 2000 (4ba298c3253d5c4d11cf822619457701b7b248c0). The class name is xmlparser.

>>> import xml.parsers.expat
>>> xml.parsers.expat.__name__
'xml.parsers.expat'
>>> xml.parsers.expat.XMLParserType
<class 'pyexpat.xmlparser'>
>>> xml.parsers.expat.XMLParserType.__name__
'xmlparser'
>>> xml.parsers.expat.XMLParserType.__qualname__
'xmlparser'
>>> xml.parsers.expat.XMLParserType.__module__
'pyexpat'

I was planned to add an anchor for the xmlparser class, but since it is available as XMLParserType, should not we simply change its name and all references in the documentation to XMLParserType? Or add an alias xmlparser? (the question is why it was not used from the beginning.)

Linked PRs
  • gh-144456

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

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

はじめの一歩

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

調査の方向性

まずこの issue とリンクされた PR gh-144456 を読み、ドキュメントで XMLParserType と xmlparser のどちらを使用すべきかを判断します。選択した公開名に定義済みのアンカーがあり、ドキュメント内の参照が一貫していれば完了です。

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

評価

技術スタック
python
領域
documentation
issue の種類
ドキュメント
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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