Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
Syntax of format strings cannot be the same as in f-strings. {0} means the first positional argument in format string an integer literal 0 in f-string. {a[x]} means the value of literal string key "x" of keyword argument a in format string, and indexing variable a with variable index/key x in f-string. Such things as {if}, {+.name} or {0[-]} are not even valid in f-strings. Since we cannot get rid of all differences between format strings and f-strings, I do not think that this one change is worth. It will only make differences more complex. Not mentioning that it is a compatibility breaking change, and can break user code. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44355> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com