[Python-porting] Pickling unbound methods on Python 3
cool-RR
cool-rr at cool-rr.com
Tue Jun 1 13:13:00 CEST 2010
On Mon, May 31, 2010 at 11:26 PM, "Martin v. Löwis" <martin at v.loewis.de>wrote:
> Am 31.05.2010 22:25, schrieb cool-RR:
>
>> On Mon, May 31, 2010 at 10:19 PM, "Martin v. Löwis" <martin at v.loewis.de
>> <mailto:martin at v.loewis.de>> wrote:
>>
>> Great! I prefer adding an attribute to the unbound methods as well.
>> Would you like to raise this on python-dev or would you like me to?
>>
>>
>> I'm very skeptical that "raising" it will have any effect. Submit a
>> patch instead.
>>
>>
>> I don't understand Martin. Unbound methods had an `.im_class` attribute
>> in Python 2.x, which is what we're talking about, and for Python 3.x
>> that attribute was purposefully removed. I am assuming it was a
>> deliberate decision by the python-dev community and that they had good
>> reasons for it. Am I not supposed to ask them about this before I put it
>> back?
>>
>
> Sure, you can ask. However, instead of asking, please study the code: the
> subversion log is available to the general public. Find out (for yourself)
> what specific revision made the change, and you can save other contributors
> the time of doing the research for you.
>
> You are mistaken that the the attribute was removed. It was not removed.
> Instead, the object returned from the attribute lookup was changed, and the
> "new" type just happened to have no im_class attribute.
> It didn't have that attribute in 2.x, either.
>
> Regards,
> Martin
>
Thanks for the clarifications, Martin and Brett.
At this time I'm both under-qualified and don't have time to work on a
patch. (I'm under-qualified because I don't code C and I'm not familiar with
Python's innards.)
Thanks for your help.
Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-porting/attachments/20100601/b1e8f3e5/attachment.html>
More information about the Python-porting
mailing list