When should I change/assign __class__ attribute in Python?
<p>There are a few questions around SO that look into setting <code>__class__</code> attribute in Python. It is mostly seen as unexpected and dangerous. For example, this question contains answers that discuss the downsides:</p>

<p><a href="http://stackoverflow.com/questions/13280680/how-dangerous-is-setting-self-class-to-something-else">How dangerous is setting self.__class__ to something else?</a></p>

<p>However, are there any "good" uses of this language feature? Is there any criteria or principle as to when one should do this?</p>
