Serhiy Storchaka added the comment:

operator.methodcaller is similar to functools.partial which is pickleable and 
can be used as a sample.

In C implementation some code can be shared between __repr__ and __reduce__ 
methods.

As for tests, different protocols should be tested. Also should be tested 
compatibility between C and Python implementations, instances pickled with one 
implementation should be unpickleable with other implementation. Move pickle 
tests into new test class.

If add __repr__ methods, they need tests. The restriction of method name type 
should be tested too.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22955>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to