Comment #3 on issue 1198 by asmeurer: pickle does not work for Function
http://code.google.com/p/sympy/issues/detail?id=1198
It was pointed out to me that namedtuple from the standard library does
something similar to Function, and is pickable. If you look at the source
for namedtuple, there is this line:
# For pickling to work, the __module__ variable needs to be set to the frame
# where the named tuple is created. Bypass this step in enviroments where
# sys._getframe is not defined (Jython for example) or sys._getframe is not
# defined for arguments greater than 0 (IronPython).
try:
result.__module__ =
_sys._getframe(1).f_globals.get('__name__', '__main__')
except (AttributeError, ValueError):
pass
Would this work for Functions?
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.