Skip to content

Commit b565709

Browse files
committed
Criado e removido atributo dinamico de objetos do tipo Pessoa
1 parent 6de20fb commit b565709

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

oo/pessoa.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ def cumprimentar(self):
1919
print(luciano.idade)
2020
for filho in luciano.filhos:
2121
print(filho.nome)
22+
luciano.sobrenome = 'Ramalho'
23+
print(luciano.sobrenome)
24+
print(luciano.__dict__)
25+
print(renzo.__dict__)
26+
del luciano.filhos
27+
print()
28+
print(luciano.__dict__)
29+
print(renzo.__dict__)
30+
2231

2332

2433

0 commit comments

Comments
 (0)