[Python-ideas] pickling obscured function references
Terry Reedy
tjreedy at udel.edu
Tue Feb 18 17:46:19 CET 2014
On 2/18/2014 1:41 AM, Henry Harrison wrote:
> I can't be the first to have thought of this, so there must be a reason
> this isn't the case, but I have to ask. Why is __main__ the fallback
> when pickle can't find a function reference?
>
> Instead of something like:
> os.path.basename(inspect.getsourcefile(func))[:-3]
>
> Thanks for humoring my curiosity,
A place to ask questions and 'humor curiosity' is python-list.
Python-ideas is for ideas for improving future version of python.
--
Terry Jan Reedy
More information about the Python-ideas
mailing list