I have noticed that the exception was caused by the call of "self.f()" within my "_generic" function. It will raise SystemError exception whenever I refer to any method or attribute of "self" within "_generic" function. Otherwise, dynamically adding method works fine. I cannot figure out what's the reason there.
CW -- http://mail.python.org/mailman/listinfo/python-list