You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update turtledemo docstrings with correct file names #125665
In #123370 , I discussed with Terry some measures to modernize the turtledemo. This requires changes to each file. First, I want to modify the incorrect comment file names, which is the easiest to review. There are five measures to modify, e.g German function names and parameter names, change ISO format time, and others focus on clock.py. I have already completed 2 in my initial commit in a0b922f , but I later reverted the changes due to backporting
From previous discussion:
I'd like to see a follow-up 'modernize PR to
Replace module docstring with "turtledemo/clock.py -- clock program showing time and date." File name is wrong and instruction only applies when run in turtledemo, which it is redundant.
(clock.py fixed)
This issue is a bug fix, not a modernization enhancement?
Can I ask why have the filename in the docstring at all?
That’s not the recommended format for docstrings, and if it’s needed by the demo machinery or the tests, then it can be found from the file without having to be in the docstring.
The original author put them there and I did not consider removing them completely, as opposed to correcting and condensing the previous headers. When files are printed (less common now than it used to be), it is nice to have the filename printed. Since this might be more useful in classrooms where turtledemo is used than in professional settings, I am not inclinded to remove them.
Activity
[-]Replace turtledemo docstring with correct file name[/-][+]Update turtledemo docstrings with correct file names[/+]gh-125665: Update turtledemo docstrings with correct file names (#125691
pythongh-125665: Update turtledemo docstrings with correct file names (…
merwok commentedon May 3, 2025
Can I ask why have the filename in the docstring at all?
That’s not the recommended format for docstrings, and if it’s needed by the demo machinery or the tests, then it can be found from the file without having to be in the docstring.
terryjreedy commentedon May 3, 2025
The original author put them there and I did not consider removing them completely, as opposed to correcting and condensing the previous headers. When files are printed (less common now than it used to be), it is nice to have the filename printed. Since this might be more useful in classrooms where turtledemo is used than in professional settings, I am not inclinded to remove them.