This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients alexandre.vassalotti, belopolsky, eric.araujo, exarkun, lemburg, pitrou
Date 2010-08-02.15:08:18
SpamBayes Score 0.013991245
Marked as misclassified No
Message-id <1280761700.47.0.104242825078.issue9276@psf.upfronthosting.co.za>
In-reply-to
Content
> Yes, I think we have a consensus on this point. Note, however that
> since unbound methods have been removed in 3.x, it is not trivial to
> find a fully qualified name of a method anymore.

I suppose only bound methods should be pickleable:

>>> class C:
...     def m(self): pass
... 
>>> c = C()
>>> c.m
<bound method C.m of <__main__.C object at 0x7fa81299b150>>
>>> c.m.__self__.__module__
'__main__'

And perhaps class methods too:

>>> class C:
...     @classmethod
...     def cm(self): pass
... 
>>> C.cm
<bound method type.cm of <class '__main__.C'>>
>>> C.cm.__self__
<class '__main__.C'>
>>> C.cm.__self__.__module__
'__main__'


> Also we need to
> decide where to stop: should methods of nested classes be pickleable?

As we want, but they needn't be.
History
Date User Action Args
2010-08-02 15:08:20pitrousetrecipients: + pitrou, lemburg, exarkun, belopolsky, alexandre.vassalotti, eric.araujo
2010-08-02 15:08:20pitrousetmessageid: <1280761700.47.0.104242825078.issue9276@psf.upfronthosting.co.za>
2010-08-02 15:08:19pitroulinkissue9276 messages
2010-08-02 15:08:18pitroucreate