Skip to content

Update turtledemo docstrings with correct file names #125665

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

Closed
Wulian233 opened this issue Oct 17, 2024 · 2 comments
Closed

Update turtledemo docstrings with correct file names #125665

Wulian233 opened this issue Oct 17, 2024 · 2 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@Wulian233
Copy link
Contributor

Wulian233 commented Oct 17, 2024

Bug report

Bug description:

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?

Linked PRs

@Wulian233 Wulian233 added the type-bug An unexpected behavior, bug, or error label Oct 17, 2024
@picnixz picnixz added the stdlib Python modules in the Lib dir label Oct 21, 2024
@terryjreedy terryjreedy changed the title Replace turtledemo docstring with correct file name Update turtledemo docstrings with correct file names Oct 23, 2024
terryjreedy added a commit that referenced this issue Oct 23, 2024
)

Co-authored-by: Wulian <xiguawulian@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
ebonnal pushed a commit to ebonnal/cpython that referenced this issue Jan 12, 2025
…python#125691)

Co-authored-by: Wulian <xiguawulian@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@merwok
Copy link
Member

merwok commented 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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
Development

No branches or pull requests

4 participants