formatter = string.Formatter()
parseiterator = formatter.parse('hello {world}')
result = next(parseiterator)
result
keyname, fielditerator = result[1]._formatter_field_name_split()
keyname
Explanation of pylint bad-format-string