Mamdani has resisted the lessons that his family experience in Uganda should have taught him about the dangers of class resentment and racial and ethnic sorting.