From: Serhiy Storchaka Date: Sun, 31 Jul 2022 20:47:28 +0000 (+0300) Subject: IDLE: Fix docs URL in the About window (#28417) X-Git-Tag: v3.12.0a1~778 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f17a754d925345d67beff18897d86780436c506;p=thirdparty%2FPython%2Fcpython.git IDLE: Fix docs URL in the About window (#28417) --- diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py index 9cb3ba78c50e..a0085a40b980 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("", lambda event: webbrowser.open(docs['text']))