July 3, 2004
1:12 p.m.
Consider following testcase: class C: pass class D(C): pass def m(self): return self C.m = m D.m = C.m print C().m() print D().m() CPython runs it okay, but PyPy baffles and raises TypeError, with message ${SUBJ}. Changing 5th line to "D.m = m" and it runs fine. The point is, "D.m = C.m" should transform C.m from unbound method of class C to unbound method of class D... This breaks mailbox.py, among other things. Read how PortableUnixMailbox is implemented there. Regards,