Inspired by the forum question

Quote:

You could also just use a defaultdict, like so:

from collections import defaultdict
...
self.vars = defaultdict(lambda: defaultdict(lambda: defaultdict(Range)))
I know that is slightly hard to read, but in essence it's the same as
the multidict that you mentioned, with the exception that it doesn't
create an instance of itself if the key cannot be found, but rather an
instance of whatever you tell it to.

Notice, in this case, the last defaultdict creates values that are
Range objects. This is nice, because you can do stuff like:

self.vars['sqrt']['call']['x'].track(somevalue)
without ever even checking any of it.
Change range according to the suggestion
This is not the reason for attribute error
Need to check forum for solution