python / python/cpython

Better/complete documentation of sys.stdin/stdout/stderr default behavior

Aperta
#92,298 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

docs
Lingua principale
Python
Stelle
77.2k
Fork
36k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

See https://docs.python.org/3/library/sys.html?highlight=stdin#sys.stdin
The default behavior of sys.stdin/stdout/stderr is not fully documented (e.g. the default newline mode, depending on OS), and the current existing documentation is a lot more difficult to understand than it would need to be, referring to internal c-api settings instead of explaining in clear language what is going.

Given how important this information is and given that the behavior of sys.stdin/out/err is surprisingly DIFFERENT from what the default would be if open with default settings would be used, making the documentation more complete and easier to understand would be rather important. The number of questions on stackoverlow (partly with incorrect or hard to verify answers) about this is a good indicator of how confusing and important this matter is.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla sezione relativa a sys.stdin, sys.stdout e sys.stderr nella pagina collegata della documentazione di Python, quindi confronta la descrizione con il comportamento di open usando le impostazioni predefinite nei diversi sistemi operativi. Il lavoro è completo quando il comportamento predefinito dei caratteri di nuova riga e le altre differenze rilevanti sono spiegati in modo chiaro e accurato senza ricorrere alla terminologia interna della C API.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.