Skip to content

Commit

Permalink
use deepcopy in copyData
Browse files Browse the repository at this point in the history
  • Loading branch information
benkiel committed Nov 5, 2024
1 parent 422b578 commit 993a9de
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Lib/fontParts/base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ def copyData(self, source):
if isinstance(selfValue, BaseObject):
selfValue.copyData(sourceValue)
else:
setattr(self, attr, sourceValue)

setattr(self, attr, deepcopy(sourceValue))
# ----------
# Exceptions
# ----------
Expand Down Expand Up @@ -832,10 +831,10 @@ def _setIdentifier(self, value):
def reference(obj):
"""
This code returns a simple function that returns the given object.
This is a backwards compatibility function that is under review.
See #749. We used to use weak references, but they proved
problematic (see issue #71), so this function was put in place to
make sure existing code continued to function. The need for it is
This is a backwards compatibility function that is under review.
See #749. We used to use weak references, but they proved
problematic (see issue #71), so this function was put in place to
make sure existing code continued to function. The need for it is
questionable, so it may be deleted soon.
"""
def wrapper():
Expand Down

0 comments on commit 993a9de

Please sign in to comment.