[New-bugs-announce] [issue37912] fstring with quotation marks conflict

Seaky Lone report at bugs.python.org
Wed Aug 21 21:02:04 EDT 2019


New submission from Seaky Lone <luokiss39 at gmail.com>:

For example, I have the following code:

something = 'some thing'
string = f'some text {something.split(' ')}'

The second expression is thought to be invalid because it is regarded as two strings ['some text {something.split(', ')}']. I have to change either pair of '' to "" in order to make things work.
I think this should not be an invalid expression because the ' ' or any other expressions inside the {} should be independent of the outer ''.

----------
components: Interpreter Core
messages: 350147
nosy: Seaky Lone
priority: normal
severity: normal
status: open
title: fstring with quotation marks conflict
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37912>
_______________________________________


More information about the New-bugs-announce mailing list