LarsHill / metadict

MetaDict is a powerful dict subclass enabling (nested) attribute-style item access/assignment and IDE autocompletion support.
Apache License 2.0
33 stars 0 forks source link

The object returned by `MetaDict.copy()` shares its underlying dict #5

Closed Kodiologist closed 2 years ago

Kodiologist commented 2 years ago
>>> from metadict import MetaDict as D
>>> d = D(a = 1)
>>> d2 = d.copy()
>>> d2['a'] = 2
>>> d
{'a': 2}

copy.deepcopy seems to work as expected.