]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40431: Fix syntax typo in turtledemo (GH-19777)
authorMiro Hrončok <miro@hroncok.cz>
Wed, 29 Apr 2020 00:00:07 +0000 (02:00 +0200)
committerGitHub <noreply@github.com>
Wed, 29 Apr 2020 00:00:07 +0000 (02:00 +0200)
***   File "/usr/lib64/python3.9/turtledemo/__main__.py", line 275
        bg="#d00" if clear == NORMAL else"#fca")
                                        ^
    SyntaxError: invalid string prefix

Lib/turtledemo/__main__.py
Misc/NEWS.d/next/Tools-Demos/2020-04-29-01-32-17.bpo-40431.B_aEZ0.rst [new file with mode: 0644]

index 17fe9a75e1c5ea93f9394de40ab28844c44c00f4..12be5098dad274a6c08b2b20728d0ff086867a1c 100755 (executable)
@@ -272,7 +272,7 @@ class DemoWindow(object):
         self.stop_btn.config(state=stop,
                              bg="#d00" if stop == NORMAL else "#fca")
         self.clear_btn.config(state=clear,
-                              bg="#d00" if clear == NORMAL else"#fca")
+                              bg="#d00" if clear == NORMAL else "#fca")
         self.output_lbl.config(text=txt, fg=color)
 
     def makeLoadDemoMenu(self, master):
diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-04-29-01-32-17.bpo-40431.B_aEZ0.rst b/Misc/NEWS.d/next/Tools-Demos/2020-04-29-01-32-17.bpo-40431.B_aEZ0.rst
new file mode 100644 (file)
index 0000000..abef046
--- /dev/null
@@ -0,0 +1 @@
+Fix a syntax typo in ``turtledemo`` that now raises a ``SyntaxError``.