[issue38539] Update demo files

2019-10-22 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset ea6041cd7ff0d752296d1759927eff898ceba864 by Raymond Hettinger in 
branch 'master':
bpo-38539:  Finish rename of ss1.py to spreadsheet.py (GH-16896)
https://github.com/python/cpython/commit/ea6041cd7ff0d752296d1759927eff898ceba864


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38539] Update demo files

2019-10-22 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +16434
pull_request: https://github.com/python/cpython/pull/16896

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38539] Update demo files

2019-10-22 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38539] Update demo files

2019-10-22 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset a4aeb336697c85996d781271cc6b42bc6d4c2908 by Raymond Hettinger 
(Julin S) in branch 'master':
bpo-38539: Update demo files (GH-16890)
https://github.com/python/cpython/commit/a4aeb336697c85996d781271cc6b42bc6d4c2908


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38539] Update demo files

2019-10-22 Thread Julin


Julin  added the comment:

I've made a PR. Can you review it?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38539] Update demo files

2019-10-22 Thread Julin


Change by Julin :


--
keywords: +patch
pull_requests: +16428
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16890

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38539] Update demo files

2019-10-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Let's just do the rename for ss1.py.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38539] Update demo files

2019-10-21 Thread Julin


Julin  added the comment:

Okay. While I'm at it, can I make a few minor change as well? Like

 - Use fstrings
 - change range(0, val) to range(val) as range()'s first argument has default 
value 0.
 - Change `for i in range(len(groups)):` to enumerated (redemo.py)
 - rename ss1.py to spreadsheet.py (to make its purpose clearer)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38539] Update demo files

2019-10-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38539] Update demo files

2019-10-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

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).

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38539] Update demo files

2019-10-20 Thread Julin


New submission from Julin :

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
 - `while 1:` being used instead of `while True:`
 - star import
 - function call and an `if` statement being on the same line, etc.

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?

--
components: Demos and Tools
messages: 355013
nosy: ju-sh
priority: normal
severity: normal
status: open
title: Update demo files
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com