mirror of
https://github.com/rjNemo/design-patterns
synced 2026-06-06 02:26:40 +00:00
15 lines
347 B
Python
15 lines
347 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class Strategy(ABC):
|
|
"""
|
|
The Strategy interface declares operations common to all supported versions
|
|
of some algorithm.
|
|
|
|
The Context uses this interface to call the algorithm defined by Concrete
|
|
Strategies.
|
|
"""
|
|
|
|
@abstractmethod
|
|
def do_algorithm(self, data: list):
|
|
pass
|