[Python-ideas] pickling obscured function references

Henry Harrison henry.schafer.harrison at gmail.com
Tue Feb 18 20:35:27 CET 2014


Apologies. Yes, I had in mind something in-between a proposal and a
question, which in retrospect was not the way to go about it. And I was not
aware of python-list, so apologies again for not researching the options
for having this discussion.

In any case after sleeping on it I'm pretty sure the answer to my question
is "because backwards compatibility" which means that the proposal would be
moot. Sorry again for wasting your time.

- Henry


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


More information about the Python-ideas mailing list