Serhiy Storchaka added the comment:
Perhaps following technique can be used to prevent object's life prolongation:
def spam(self, *args, **kwargs):
@lru_cache(maxsize=20)
def spam(foo, bar=1, *, baz=None):
...
self.spam = spam
return self.spam(*args, **kwargs)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19859>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com