Skip to content

Commit 7cf0ad3

Browse files
committed
fix bug
1 parent 9bc1b68 commit 7cf0ad3

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

brainpy/tools/dicts.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,6 @@ def add_attr_not_key(self, *args):
9797
raise TypeError('Only support string.')
9898
self.attrs_not_keys += args
9999

100-
def __setitem__(self, key, value):
101-
"""Overload bracket assignment to catch potential conflicts during assignment."""
102-
if key in self:
103-
if id(self[key]) != id(value):
104-
raise ValueError(f'Name "{key}" conflicts: same name for {value} and {self[key]}.')
105-
dict.__setitem__(self, key, value)
106-
107-
def replace(self, key, new_value):
108-
"""Replace the original key with the new value."""
109-
self.pop(key)
110-
self[key] = new_value
111-
112100
def update(self, *args, **kwargs):
113101
super().update(*args, **kwargs)
114102
return self

0 commit comments

Comments
 (0)