Amaury Forgeot d'Arc added the comment: Functions are pickled by name, not by code. Unpickling will only work if a function with the same name is present in in the same module (__main__ in your example)
This is why pickling a lambda won't work: they have no individual names. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19272> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com