Bug description:
Hi all,
I dont necessarily know if this is a bug or potentially just a user error but I have tried every permutation of the following code and have not been able to get it to work properly. This is mainly a visual issue as the code AFTER the issue still works properly and as expected in Python. I suspect because of how many quotation marks are in the block, it may be messing with the code.
Please let me know if this is just a user error, I cant seem to get it working properly
The code I am running is:
- after already connecting to a DB -
cur = conn.cursor() *# conn refers to the connection to the DB#*
cur.execute(
f'''INSERT INTO "{user_id}"(ID, PLACEHOLDER1, PLACEHOLDER2, PLACEHOLDER3, PLACEHOLDER4, WINS, LOSSES, PLACEHOLDER)
VALUES (1,'{example_text}',1,30,0,0,0,500);
''')
# '''
Expected vs Current Behavior:
Current -
In the example above, each quotation string has its appropriate pair however, if I did not include the last # ‘’', the code after the SQL query would not appear visually like regular python code. It would instead appear as if the rest of the code in the Repl shows as its in a string block.
Expected -
Expected behavior would be that the first quote block ( f’‘’ ) would be paired with the last quote block ( ‘’') ) and everything in between the triple quotes would be included in that string.
Steps to reproduce:
- Connect to PostGreSQL DB that is provided by Repl for 100 cycles/day
- Insert the above code and begin typing new code after the command
Screenshot(s)/Screen Recording:
Before removing
Browser/OS/Device:
Windows - Firefox - Desktop
Replit Profile:
https://replit.com/@isaacjtrigoso