Open bigeagle opened 5 years ago
AttrDict is an inactive project. AttrDict
has tested in python3.7
The last update:
v2.0.1 2019/02/01 -- Haven't used or looked at this in years so updating tests to the current version of python and then marking it inactive.
EasyDict
When the default value of a child class attribute is dict
, an exception is caused:
An RecursionError: maxinum recursion depth exceeded
addict will not let you override attributes that are native to dict, so the following will not work
>>> mapping = Dict()
>>> mapping.keys = 2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "addict/addict.py", line 53, in __setattr__
raise AttributeError("'Dict' object attribute '%s' is read-only" % name)
AttributeError: 'Dict' object attribute 'keys' is read-only
Sometimes it's not friendly. And, There was also an important bug that caused me to abandon it.
import addict
class Child(addict.Dict): def __init(self, *args, **kwargs): self.a
D = Child()
When accessing a nonexistent attribute in the `__init__` function of child class, an exception is caused:
An RecursionError: maxinum recursion depth exceeded
Currently AttrDict
is only used in HyperParameterOccurence
. I recommend implementing it without AttrDict.
fixed in #4
https://github.com/bcj/AttrDict is archived by the owner and now an inactive project. I suggest switching to an active alternative.