a = 19/3
print('just testing {a:1.4f}'.format (a))
In python 3.5 this results in an error KeyError: 'a'
.
I cannot understand why. I can use a workaround to overcome the error but I would really appreciate if somebody could explain why am I getting the error.