This is a top-tier 'newbie trap' that every Python learner struggles with at least once, caused by the combination of Python's LEGB rule (scope lookup order) and the unique position of the 'class ...
Even the most seasoned senior developers, armed with years of experience, routinely stumble over traps in Python. It's not hard and doesn't stem from a lack of technical skill, but from an ingrained ...