Message112486
> 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. |
|
Date |
User |
Action |
Args |
2010-08-02 15:08:20 | pitrou | set | recipients:
+ pitrou, lemburg, exarkun, belopolsky, alexandre.vassalotti, eric.araujo |
2010-08-02 15:08:20 | pitrou | set | messageid: <1280761700.47.0.104242825078.issue9276@psf.upfronthosting.co.za> |
2010-08-02 15:08:19 | pitrou | link | issue9276 messages |
2010-08-02 15:08:18 | pitrou | create | |
|