[Python-ideas] pickling obscured function references

Henry Harrison henry.schafer.harrison at gmail.com
Tue Feb 18 07:41:22 CET 2014


Hello all,

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,
- Henry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140218/02d6dcdb/attachment.html>


More information about the Python-ideas mailing list