python / python/cpython

socket module documentation: confusing display of module functions vs class methods

Aberta
#94,432 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

docs topic-socket
Linguagem predominante
Python
Estrelas
77.2k
Forks
36k
Métricas de merge de PRs
Métricas de PR pendentes

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece pela seção da documentação do módulo socket vinculada na issue, comparando a apresentação de socket.getaddrinfo com socket.socket.accept. Determine uma forma mais clara de distinguir funções no nível do módulo de métodos de classe sem alterar o estilo geral da documentação; considera-se concluído quando os leitores conseguirem identificar o objeto ao qual cada elemento pertence a partir da documentação renderizada e dos links diretos.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
documentation
Tipo de issue
Documentação
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.