Under what circumstances is it possible, and when is it impossible, to assign to an instance's __class__
attribute in Python?
Error messages such as TypeError: __class__ assignment: only for heap types
don't really do it for me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…