Dataclasses and repr
__repr__
is implemented
from shapes import Point
p1 = Point(2, 3, 'left')
print(p1) # Point(x=2, y=3, name='left')
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
__repr__
is implementedfrom shapes import Point
p1 = Point(2, 3, 'left')
print(p1) # Point(x=2, y=3, name='left')