It looks like you can get the field names using the method Formatter.parse:
>>> import string
>>> my_string = 'I live in {city}, {state}, {country}.'
>>> [tup[1] for tup in string.Formatter().parse(my_string) if tup[1] is not None]
['city', 'state', 'country']
. : "{foo}{1}{}" ['foo', '1', '']. , str.isdigit() .