Код: Выделить всё
match shape:
case Point(x, y):
...
case Rectangle(x, y, _, _):
...
print(x, y)
Я нашел его здесь: https://www.python. org/dev/peps/pep-0622/#the-match-statement
Есть идеи?
Подробнее здесь: https://stackoverflow.com/questions/659 ... n-matching
Мобильная версия