summaryrefslogtreecommitdiff
path: root/doc/data/messages/a/abstract-class-instantiated/good.py
blob: c9dbce107ba26b8025763fb3d0fb9868c64dfb02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import abc


class Animal(abc.ABC):
    @abc.abstractmethod
    def make_sound(self):
        pass


class Sheep(Animal):
    def make_sound(self):
        print("bhaaaaa")


sheep = Sheep()