open() built in's doc does not say what the buffering default of -1 means

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

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

評価

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

調査の方向性

docs.python.org/3.10/library/functions.html#open の open() ドキュメントページから始め、シグネチャと buffering パラメーターの説明を確認してください。-1 内の余分なスペースを削除し、buffering のデフォルト値が何を意味するかを文書化すれば完了です。

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

説明

docs

On this page https://docs.python.org/3.10/library/functions.html#open the signature of the function is shown as:

open(file, mode='r', buffering=- 1, encoding=None, errors=None, newline=None, closefd=True, opener=None)

Notice the spurious space between the - and the 1.

But more importantly, the explanation of bufferings meaning is:

buffering is an optional integer used to set the buffering policy. Pass 0 to switch buffering off (only allowed in binary mode), 1 to select line buffering (only usable in text mode), and an integer > 1 to indicate the size in bytes of a fixed-size chunk buffer.

In other words, it does not explain what the -1 default means. I assume it means "use the default buffering size for the given mode"; but it really ought to say.

主要言語
Python
スター
77.2k
フォーク
36k
平均マージ
1日 9時間
マージ済み PR(30日)
558

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

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

はじめの一歩

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

python/cpython のほかの issue

python/cpython の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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