Feature Request: Additional Clarification on "Simple Example" in "introduction.txt"

Aberta
#206 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
45/100
Tipo de issue
Documentação
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
documentation

Direção de pesquisa

Abra introduction.txt e leia a seção 2.1 junto com seus dois exemplos de janela. Verifique como o texto descreve atualmente a janela 200 x 200 e a janela Hello World com tamanho diferente; a documentação estará concluída quando explicar o comportamento relevante de dimensionamento e os valores padrão sem deixar esses exemplos sem explicação.

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

Descrição

I hope this isn't too pedantic as a request, but just reading section 2.1 of the guide from the top, the first statement claims, "This program will create an empty 200 x 200 pixel window."
A graphical representation of such a window is then included.
The page then provides a 9-line program by way of an example, in source code, then follows to "explain each line of the example."

However, nowhere on this page does the text return to the subject of "200 x 200 pixel" sizing. It seems reasonable for the initial declarative statement to explain what is about to happen, but there is nothing in the sample code which defines such a size and it is therefore implied that Python's "Gtk.Window()" method, or perhaps "win.show_all()", must somehow default to these dimensions unless explicitly told otherwise.

If you're going to have a "simple example", can I respectfully request/suggest that the explanatory text be expanded just enough to tell the reader where the window dimensions come from.

I appreciate that this might come across as pedantry, but syntax is critical in programming, so in the early stages of introducing a language or framework, I would suggest that all defaults and assumptions need to be discussed.

This is all the more relevant given the second example on the Introduction Page (the ubiquitous "Hello World" application with the "Click Here" button. Miraculously, the rendered window has changed size. Yet again, there is nothing in the code to suggest window size or why this might be different from the first example. The two examples imply that if you deploy a random, empty window, then it will default to a size of 200x200 pixels, but if you deploy a window that contains an object (your second example uses a button), then the window will automatically size itself to the dimensions of the rendered contents.

None of which is explained.

Even if you want to direct your reader to set this aside, please don't leave hanging threads at the start...

Thank you

Linguagem predominante
Python
Estrelas
392
Forks
157
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

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.

Mais de sebp/PyGObject-Tutorial

Todas as issues de sebp/PyGObject-Tutorial

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

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