Skip to content

Commit 440c0fa

Browse files
author
brunofalis0@gmail.com
committed
Created the attrubite eyes
1 parent eef9d4e commit 440c0fa

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎oo/pessoa.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class Person():
2+
eyes = 2
3+
24
def __init__(self,*sons, name=None, age=0):
35
self.age = age
46
self.name = name
@@ -24,5 +26,14 @@ def greet(self):
2426

2527
del valeria.lastName
2628

29+
valeria.eyes = 1
30+
del valeria.eyes
31+
2732
print(valeria.__dict__)
2833
print(bruno.__dict__)
34+
35+
Person.eyes = 3
36+
print(Person.eyes)
37+
print(valeria.eyes)
38+
print(bruno.eyes)
39+
print(id(Person.eyes),id(valeria.eyes),id(bruno.eyes))

0 commit comments

Comments
 (0)