Ask Your Question

f triple quote string error

asked 2020-04-16 11:21:36 -0500

HAMMER_GIL's avatar

updated 2020-04-17 12:47:38 -0500

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.

edit retag flag offensive close merge delete


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

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-17 12:47:30 -0500

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-04-16 11:21:36 -0500

Seen: 644 times

Last updated: Apr 17 '20