Skip to content

Commit

Permalink
Update base.py (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
benkiel authored Oct 3, 2024
1 parent f72b3c1 commit 2bfa558
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Lib/fontParts/base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,14 @@ def _setIdentifier(self, value):


def reference(obj):
# import weakref
# return weakref.ref(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
questionable, so it may be deleted soon.
"""
def wrapper():
return obj
return wrapper
Expand Down

0 comments on commit 2bfa558

Please sign in to comment.