Skip to content

Commit 0f17a75

Browse files
IDLE: Fix docs URL in the About window (#28417)
1 parent aa37ffd commit 0f17a75

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/idlelib/help_about.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ def create_widgets(self):
9191
email = Label(frame_background, text='email: [email protected]',
9292
justify=LEFT, fg=self.fg, bg=self.bg)
9393
email.grid(row=6, column=0, columnspan=2, sticky=W, padx=10, pady=0)
94-
docs = Label(frame_background, text="https://docs.python.org/"
95-
f"{version[:version.rindex('.')]}/library/idle.html",
94+
docs_url = ("https://docs.python.org/%d.%d/library/idle.html" %
95+
sys.version_info[:2])
96+
docs = Label(frame_background, text=docs_url,
9697
justify=LEFT, fg=self.fg, bg=self.bg)
9798
docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)
9899
docs.bind("<Button-1>", lambda event: webbrowser.open(docs['text']))

0 commit comments

Comments
 (0)