You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pull request #75 adds pickling of anonymous tuples. But it uses sys._getframe() which is an cpython specific implementation function. So to support a more portable approach need to look at alternatives. The idea is to transform the anonymous tuple into a normal tuple during the pickling process (in the Predicate.__setstate__() function )and during unpickling (in the Predicate.__getstate__() function), turn the tuple back into the appropriate anonymous tuple.
Note: I think this idea should work for anonymous tuples that are part of an otherwise pickleable predicate sub-class definition. However, it would not solve the problem for other dynamically generated predicate sub-classes, such as using the simple_predicate() function.
The text was updated successfully, but these errors were encountered:
Pull request #75 adds pickling of anonymous tuples. But it uses
sys._getframe()
which is an cpython specific implementation function. So to support a more portable approach need to look at alternatives. The idea is to transform the anonymous tuple into a normal tuple during the pickling process (in thePredicate.__setstate__()
function )and during unpickling (in thePredicate.__getstate__()
function), turn the tuple back into the appropriate anonymous tuple.Note: I think this idea should work for anonymous tuples that are part of an otherwise pickleable predicate sub-class definition. However, it would not solve the problem for other dynamically generated predicate sub-classes, such as using the
simple_predicate()
function.The text was updated successfully, but these errors were encountered: