socket module documentation: confusing display of module functions vs class methods
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 36k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
socket, the module contains socket, the class. In the documentation, the functions of the module are rendered in exactly the same way as the methods of the class: socket.getaddrinfo and socket.accept look 'the same' in the documentation, even though the latter is actually socket.socket.accept. The only clue to that is the paragraph at the beginning of the section, but when e.g. linking to a particular method, that's easy to miss, and the user is left to infer that from the method description (or realise they have to scroll up/which section they're in).
The docs consistently use module.func for module-level functions and class.func for the methods of module.class. That style's fine most of the time and avoids the potential visual overload of always writing module.class.func. Naturally, the confusion arises only because the module and class have the same name in this particular case.
I'm not sure how to best resolve this, but I feel like the current situation is certainly not ideal.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dalla sezione della documentazione del modulo socket collegata nell’issue, confrontando la presentazione di socket.getaddrinfo con quella di socket.socket.accept. Determina un modo più chiaro per distinguere le funzioni a livello di modulo dai metodi di classe senza modificare lo stile generale della documentazione; il lavoro è completato quando i lettori possono identificare l’oggetto a cui appartiene ciascun elemento dalla documentazione renderizzata e dai link diretti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100