Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions imas/ids_structure.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This file is part of IMAS-Python.
# You should have received the IMAS-Python LICENSE file with this project.
"""A structure in an IDS
"""
"""A structure in an IDS"""

import logging
from copy import deepcopy
Expand Down Expand Up @@ -151,7 +150,9 @@ def __deepcopy__(self, memo):
for child in self._children:
if child in self.__dict__:
child_copy = deepcopy(getattr(self, child), memo)
setattr(copy, child, child_copy)
# bypass __setattr__:
copy.__dict__[child] = child_copy
child_copy._parent = copy
return copy

def __dir__(self) -> List[str]:
Expand Down
Loading