summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-07-31 21:09:11 (GMT)
committerGitHub <noreply@github.com>2022-07-31 21:09:11 (GMT)
commit03fed0ade40af6877ed0d8289c05c46e985b66ec (patch)
tree76576755daf076a841607edc6a9789562719cc47 /Lib/idlelib
parentae2496245774fd196948f61a064dd2c5410ed34f (diff)
downloadcpython-03fed0ade40af6877ed0d8289c05c46e985b66ec.zip
cpython-03fed0ade40af6877ed0d8289c05c46e985b66ec.tar.gz
cpython-03fed0ade40af6877ed0d8289c05c46e985b66ec.tar.bz2
IDLE: Fix docs URL in the About window (GH-28417)
(cherry picked from commit 0f17a754d925345d67beff18897d86780436c506) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/help_about.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py
index c59f494..710f2ac 100644
--- a/Lib/idlelib/help_about.py
+++ b/Lib/idlelib/help_about.py
@@ -91,8 +91,9 @@ class AboutDialog(Toplevel):
email = Label(frame_background, text='email: idle-dev@python.org',
justify=LEFT, fg=self.fg, bg=self.bg)
email.grid(row=6, column=0, columnspan=2, sticky=W, padx=10, pady=0)
- docs = Label(frame_background, text="https://docs.python.org/"
- f"{version[:version.rindex('.')]}/library/idle.html",
+ docs_url = ("https://docs.python.org/%d.%d/library/idle.html" %
+ sys.version_info[:2])
+ docs = Label(frame_background, text=docs_url,
justify=LEFT, fg=self.fg, bg=self.bg)
docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)
docs.bind("<Button-1>", lambda event: webbrowser.open(docs['text']))