I am trying to get a list of parameters from a formatted Python string.
So my string looks something like this:
formatted_string = 'I am {foo}. You are {{my}} {bar}.'
I am trying do to something like:
get_named_parameters(formatted_string) = ['foo', 'bar']
Is there a way of doing that without making my own function? I couldn't find anything in String Formatter docs.
I am using Python3, but it would be nice if it would work in 2.7 as well.