You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from frozendict import frozendict
a = frozendict({'a': 1})
b = a.copy()
b['c'] = 1
throws the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'frozendict' object does not support item assignment
However, a common usage in my program is to copy over the unmodifiable frozendict to another place and do some modification. I wonder if we can provide a method called modifiable_copy such that
from frozendict import frozendict
a = frozendict({'a': 1})
b = a.modifiable_copy()
b['c'] = 1
is allowed
The text was updated successfully, but these errors were encountered:
throws the following error:
However, a common usage in my program is to copy over the unmodifiable frozendict to another place and do some modification. I wonder if we can provide a method called
modifiable_copy
such thatis allowed
The text was updated successfully, but these errors were encountered: