According to https://www.tutorialspoint.com/python/python_dictionary.htm I should be able to add a property to a dictionary quite easily, however the hasattr function does not seem to notice any change on the dictionary:
obj = {}
obj["foo"] = "bar"
print hasattr(obj, "foo") # prints False
Why is this, and is there a workaround?