New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update demo files #82720
Comments
The demo programs inside Tools/demo, which is to guide people new to the language (that's the purpose, right?), makes use of several bad coding practices. Like
It can easily mislead someone new to the language especially since it is part of the codebase and part of distribution as well. Can we update these files? Most of these seem have not been updated in some time. A discussion touching this problem on #python-dev suggested that the demos were written when the docs were yet to be polished and now that we have a fully fledged documentation, maybe the demo files can be dropped. But since the bpo has an option 'Demos and tools' under 'components', I guess maybe the demos are still considered essential. What do you all think? |
The Tools/demo modules are sort of a quaint museum to the past. That said, most of the code reads fine even by today's standards. Go ahead with as PR to change "while 1" to "while True". The star imports should remain (they are the norm for Tkinter) code. Let's don't reformat the if/action pairs on the same line. That reflects the author's way of thinking about the problem. Though it may offend your stylistic sensibilities, it is valid Python and readable enough. BTW, the scripts are almost never "guide people new to the language". They are typically only found by experienced programmers exploring the tree of code (like little easter eggs). |
Okay. While I'm at it, can I make a few minor change as well? Like
|
Let's just do the rename for ss1.py. |
I've made a PR. Can you review it? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: