Why are __dict__ and, for example, __unicode__ not both called, or vice versa?
Django tells me that to return as unicode as a method on a model, for example:
class Obj(models.Model): def __unicode__(self): return 'hey' >>> x = Obj() <__main__.Obj object at 0x100703e10> >>> x.__unicode__() u'hello' >>> x.__dict__ {}
It seems like a strange mismatch, can someone explain this to me?
source share