Setters - assign to the attributes
from shapes import Point
p1 = Point(4, 5)
print(p1.x) # 4
print(p1.y) # 5
p1.x = 23
p1.y = 17
print(p1.x) # 23
print(p1.y) # 17
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
from shapes import Point
p1 = Point(4, 5)
print(p1.x) # 4
print(p1.y) # 5
p1.x = 23
p1.y = 17
print(p1.x) # 23
print(p1.y) # 17