Python · OOP: Properties, Methods & Data Classes
Code does if obj.config: ... but config may be unset, risking AttributeError. Compare the two guards: hasattr(obj, "config") vs getattr(obj, "config", None).
Answer locked. Get the free KnowCard app to reveal it — plus spaced-repetition review so it actually sticks.
