We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93ae509 commit f67a14aCopy full SHA for f67a14a
1 file changed
persona.py
@@ -30,4 +30,13 @@ def cammina(self):
30
print('la persona sta camminando')
31
32
def dorme(self):
33
- print('la persona sta dormendo')
+ print('la persona sta dormendo')
34
+
35
+ def __str__(self):
36
+ return str(self._nome) + ' ' + str(self._cognome) + ' ' + str(self._data_nascita)
37
38
+ def __eq__(self,other):
39
+ if isinstance(other):
40
+ if other._nome==self._nome and other._cognome==self._cognome and other._data_nascita==self._data_nascita:
41
+ return True
42
+ return False
0 commit comments