In the django documentation it says that . notation will do a lookup in the following order
#Dictionary lookup. Example:
foo["bar"]
#Attribute lookup. Example:
foo.bar
#List-index lookup. Example:
foo[bar]
In my project I have a dictionary:
foo = {'ba-r':'...}
But using . notation causes an error, which appears to be because the entire 'foo.ba-r' is a variable as described in the documentation here.
foo.ba-r
Is there any way to properly access the 'ba-r' key of my dictionary?