We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 117f5d8 commit 23ac29cCopy full SHA for 23ac29c
1 file changed
oo/pessoa.py
@@ -1,5 +1,7 @@
1
class Pessoa:
2
3
+ olhos = 2
4
+
5
def __init__(self, *filhos, nome=None, idade=35):
6
self.nome = nome
7
self.idade = idade
@@ -22,6 +24,14 @@ def cumprimentar(self):
22
24
print(filho.nome)
23
25
luciano.sobrenome = 'Ramalho'
26
del luciano.filhos
27
+ luciano.olhos = 1
28
+ del luciano.olhos
29
print(luciano.__dict__)
30
print(renzo.__dict__)
31
+ Pessoa.olhos = 3
32
+ print(Pessoa.olhos)
33
+ print(luciano.olhos)
34
+ print(renzo.olhos)
35
+ print(id(Pessoa.olhos), id(luciano.olhos), id(renzo.olhos))
36
37
0 commit comments