[Python-porting] Pickling unbound methods on Python 3

M.-A. Lemburg mal at egenix.com
Mon May 31 12:18:26 CEST 2010


cool-RR wrote:
> On Mon, May 31, 2010 at 9:31 AM, M.-A. Lemburg <mal at egenix.com> wrote:
>>
>> I suppose the easiest way to add the information about the defining
>> class is to have the class constructor add a function attribute
>> to the (unbound) method functions. This should be the name of
>> the defining class to avoid circular references.
>>
>> --
>> Marc-Andre Lemburg
>>
> 
> As a workaround that'll work, yeah. But we were discussing whether we can
> make a real solution. (Unless you were proposing that Python itself will do
> this and not just my program; In that case I'm totally with you, but it
> seems that the Python community isn't.)

I was thinking of having this in Python itself. The compiler has
all the information available, so why not add some of this useful
meta-information to the created objects ?!

This is not the same as creating a new bound method type - we'd
only add some extra information for function objects that happen
to be defined as methods.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 31 2010)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2010-07-19: EuroPython 2010, Birmingham, UK                48 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-porting mailing list