[Python-ideas] pickling obscured function references
Andrew Barnert
abarnert at yahoo.com
Tue Feb 18 18:54:06 CET 2014
On Feb 18, 2014, at 8:46, Terry Reedy <tjreedy at udel.edu> wrote:
> 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.
I think he may have actually wanted to propose this change, but posted it in an overly tentative way so that if it was a bad idea (as, after all, most language change proposals are...), people would explain gently why it's a bad idea instead of just rejecting it out of hand. (I don't think it's a good idea to post that way on this list--in fact, it's likely to have the opposite of the intended effect--but I can understand why someone might expect it to be.)
More information about the Python-ideas
mailing list