Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythonpropertySingle-choice MCQ

When you define a property's setter, why must the setter method share the exact same name as the getter (e.g. `@celsius.setter` on a method also named `celsius`)?

class Temp: @property def celsius(self): return self._c @celsius.setter def celsius(self, v): self._c = v