[issue29668] f-strings don't change the values as expected.
Rafael Capucho added the comment: Serhiy Storchaka, Thank you for your explanation. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29668> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29668] f-strings don't change the values as expected.
Rafael Capucho added the comment: I got: SELECT COUNT(*) FROM `{a}` entry WHERE entry.type == 'device' AND entry.instance == {a} I expect the value of `{a}` changed, like: SELECT COUNT(*) FROM `some_underscored_value` entry WHERE entry.type == 'device' AND entry.instance == some_underscored_value -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29668> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29668] f-strings don't change the values as expected.
Rafael Capucho added the comment: ``` a = "some_underscored_value" u = (f" hello `{a}` cruel world" " hi") print(u) query = (f"SELECT COUNT(*) " "FROM `{a}` entry " "WHERE entry.type == 'device' " "AND entry.instance == {a}") print(query) ``` -- Added file: http://bugs.python.org/file46674/file.py ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29668> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29668] f-strings don't change the values as expected.
New submission from Rafael Capucho: In the attached file, the lines 4 and 6 have the same structure, the line 4 changes the value of {a} properly, the line 6 didn't. Thank you. -- components: Interpreter Core files: crazy.png messages: 288649 nosy: Rafael Capucho priority: normal severity: normal status: open title: f-strings don't change the values as expected. type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file46673/crazy.png ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29668> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com