[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-05-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I believe the file was synchronized across versions as new features have not 
recently been added. Backporting the fix to my typo should keep it that way.  
This is an example of why code review even of patches that 'work' is a good 
thing.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-29 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, the typo is now fixed in 3.7, 3.8 and master branches ;-) Thanks Miro for 
the bug reportand Kyle for the backport.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-29 Thread miss-islington


miss-islington  added the comment:


New changeset adb1f853482e75e81ae0ae7307318a1051ca46b5 by Miss Islington (bot) 
in branch '3.7':
[3.8] bpo-40431: Fix syntax typo in turtledemo (GH-19777) (GH-19784)
https://github.com/python/cpython/commit/adb1f853482e75e81ae0ae7307318a1051ca46b5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-29 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +19112
pull_request: https://github.com/python/cpython/pull/19789

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Change by Kyle Stanley :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:


New changeset cc011b5190b63f0be561ddec38fc4cd9e60cbf6a by Kyle Stanley in 
branch '3.8':
[3.8] bpo-40431: Fix syntax typo in turtledemo (GH-19777) (#19784)
https://github.com/python/cpython/commit/cc011b5190b63f0be561ddec38fc4cd9e60cbf6a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Change by Kyle Stanley :


--
pull_requests: +19107
pull_request: https://github.com/python/cpython/pull/19784

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Change by Kyle Stanley :


--
versions:  -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

Victor Stinner wrote:
> If you backport the change, please remove the NEWS entry, since it's not a 
> SyntaxError in 3.7 and 3.8.

Good point. In that case, I'll do a manual backport of the PR just to 3.8 and 
skip the news entry. As mentioned above, I think most of the value in fixing it 
when the SyntaxError isn't present is mainly just for providing a good example 
in the latest stable version of the stdlib, so I don't think there would be 
much additional value in also backporting it to 3.7.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

If you backport the change, please remove the NEWS entry, since it's not a 
SyntaxError in 3.7 and 3.8.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

> I don't think that it's worth it to backport the change to 3.7 and 3.8: in 
> Python 3.7 and 3.8, the code is accepted.

> Python 3.7 and 3.8 are not broken, so there is no need to fix them :-)

I think we could very reasonably change  `else"#fca"` -> `else "#fca"` on the 
current bugfix branches, or at least 3.8. Even when it doesn't cause a syntax 
error and the attempted prefix is ignored, it's still more syntactically 
correct compared to attempting to use an "e-string" (which of course doesn't 
exist) and has nearly zero cost on our end to fix. 

While it's a low priority issue since it doesn't raise an error, that doesn't 
necessarily mean it's correct. In the latest stable version of the stdlib, we 
should aim to provide a good example IMO, especially if it comes at practically 
zero cost to us.

--
nosy: +aeros
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open
versions: +Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

> I am OK. I don't see why not to backport it, but I don't care much.

Python 3.7 and 3.8 are not broken, so there is no need to fix them :-) Thanks 
for the fix.

I reported the issue to:
https://bugs.python.org/issue40246#msg367587

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Miro Hrončok

Miro Hrončok  added the comment:

I am OK. I don't see why not to backport it, but I don't care much.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

I don't think that it's worth it to backport the change to 3.7 and 3.8: in 
Python 3.7 and 3.8, the code is accepted.

I also reported the issue to: https://bugs.python.org/issue40334#msg367580

Miro: are you ok to close the issue (not backport)?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 49f70db83e2c62ad06805927f53f6c3e8f4b798e by Miro Hrončok in 
branch 'master':
bpo-40431: Fix syntax typo in turtledemo (GH-19777)
https://github.com/python/cpython/commit/49f70db83e2c62ad06805927f53f6c3e8f4b798e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Miro Hrončok

Change by Miro Hrončok :


--
keywords: +patch
pull_requests: +19097
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19777

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Miro Hrončok

New submission from Miro Hrončok :

With Python 3.9.0a6 we get the following syntax error when bytecompiling the 
standard library in Fedora:


Compiling '/usr/lib64/python3.9/turtledemo/__main__.py'...
***   File "/usr/lib64/python3.9/turtledemo/__main__.py", line 275
bg="#d00" if clear == NORMAL else"#fca")
^
SyntaxError: invalid string prefix


I've looked and the bad code is there for all branches, but only with 3.9.0a6 I 
get the SyntaxError.

I wonder whether this is a know new SyntaxError or not. This "worked" with 
3.9.0a5:

>>> "yes" if False else"no"
'no'

Happy to submit a PR for turtledemo.

--
components: Demos and Tools
messages: 367575
nosy: hroncok, petr.viktorin, vstinner
priority: normal
severity: normal
status: open
title: turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com