June 7, 2014
11:09 p.m.
Neil Girdhar wrote:
Have you tried implementing getstate and setstate with cooperatively inherited classes? You'll need to call super().__getstate__(), which won't exist, but it really should.
The same issue exists with *any* method that you use in a cooperative super call. You need to ensure that there is a class at the end of the MRO with a method that terminates the super call chain. It's obviously infeasible to add all such possible methods to class object. You will have to provide a *very* strong reason why __getstate__ and __setstate__ should be singled out for special treatment in this regard. -- Greg