sebp / sebp/PyGObject-Tutorial
Feature Request: Additional Clarification on "Simple Example" in "introduction.txt"
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 392
- 派生
- 157
- PR 合并指标
- 30 天内没有已合并 PR
描述
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
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
打开 introduction.txt,并结合其中的两个窗口示例阅读第 2.1 节。检查文本目前如何描述 200 x 200 窗口和大小不同的 Hello World 窗口;当文档解释了相关的大小行为和默认值,且没有让这些示例缺乏解释时,文档工作就完成了。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100