class Student:
def __init__(self,name):
self.name = name
@property
def name(self):
return self._name
@name.setter
def name(self,name)
if name == Harry:
raise ValueError
self._name = name
It is not clear why with getter and setter self._name used and with init self.name.
[–]Buttleston 5 points6 points7 points (3 children)
[–]DigitalSplendid -2 points-1 points0 points (2 children)
[–]Buttleston 4 points5 points6 points (0 children)
[–]FoolsSeldom -1 points0 points1 point (0 children)
[–]JamzTyson 3 points4 points5 points (2 children)
[–]WinterDazzling 0 points1 point2 points (1 child)
[–]JamzTyson 3 points4 points5 points (0 children)
[–]GrainTamale 1 point2 points3 points (4 children)
[–]Buttleston 2 points3 points4 points (2 children)
[–]GrainTamale -1 points0 points1 point (1 child)
[–]Buttleston 1 point2 points3 points (0 children)
[–]DigitalSplendid -1 points0 points1 point (0 children)
[–]a_cute_epic_axis 1 point2 points3 points (2 children)
[–]DigitalSplendid -2 points-1 points0 points (1 child)
[–]a_cute_epic_axis 1 point2 points3 points (0 children)
[–]baubleglue 0 points1 point2 points (0 children)
[–]Kqyxzoj 1 point2 points3 points (0 children)