First time here? Check out the FAQ!
1

f triple quote string error

message = f""" Traceback (most recent call last): Python Shell, prompt 9, line 1 Syntax Error: EOF while scanning triple-quoted string literal: <string>, line 1, pos 15

I can type the same in IDLE and no error. This seems to be specific to WING when trying to type a multi-line f-string.

HAMMER_GIL's avatar
11
HAMMER_GIL
asked 2020-04-16 11:21:36 -0500
Wingware Support's avatar
4k
Wingware Support
updated 2020-04-17 12:47:38 -0500
edit flag offensive 0 remove flag close merge delete

Comments

I did just discover that I must put a space after "f" for this to work:

message = f """

when I hit enter I don't get an error. Still strange though because I was just following a tutorial online and got this error, and had no error when I tried IDLE.

HAMMER_GIL's avatar HAMMER_GIL (2020-04-16 11:23:46 -0500) edit

It looks like the code that's determine whether a line is complete is not handling things like f"", b"", etc, correctly. We'll try to fix this soon. The only work-around I could come up with is typing it in an editor and using Source > Evaluate Selection in Python Shell. Thanks for reporting this!

Wingware Support's avatar Wingware Support (2020-04-17 11:08:49 -0500) edit
add a comment see more comments

1 Answer

0

This will be fixed in our next update (7.2.2.4). Thanks again for reporting this problem!

Wingware Support's avatar
4k
Wingware Support
answered 2020-04-17 12:47:30 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer