DottedDict
DottedDict copied to clipboard
hasattr() throws an exception when called on DottedDict
trafficstars
hasattr() in python is implemented by calling __getattr__ and checking whether it threw AttributeError. Since for DottedDict __getattr__ = __getitem__, a KeyError is thrown and not AttributeError, therefore hasattr can fall with an exception instead of returning False
The simplest fix that I came up with is in pr #14