We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A dict is supposed to have a .copy() method (https://docs.python.org/3/library/stdtypes.html#dict.copy). For an OmegaConf object to be compatible with a dict's API, it should also support the copy() method -
>>> from omegaconf import OmegaConf >>> conf = OmegaConf.create({"a": 2, "b": [1,2,3]}) >>> conf {'a': 2, 'b': [1, 2, 3]} >>> conf.copy() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'NoneType' object is not callable
The text was updated successfully, but these errors were encountered:
Thanks for reporting. For now please use:
from omegaconf import OmegaConf import copy conf = OmegaConf.create({"a": 2, "b": [1,2,3]}) conf2 = copy.deepcopy(conf)
I will look into implementing shallow copy as conf.copy() but it may not be trivial, the only support copy right now is deep copy.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
A dict is supposed to have a .copy() method (https://docs.python.org/3/library/stdtypes.html#dict.copy). For an OmegaConf object to be compatible with a dict's API, it should also support the copy() method -
The text was updated successfully, but these errors were encountered: