We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3a7f46 commit a264c53Copy full SHA for a264c53
solid-principles-python/app_dip.py
@@ -1,23 +1,23 @@
1
from abc import ABC, abstractmethod
2
3
# Bad example
4
-# class Frontend:
5
-# def __init__(self, backend):
6
-# self.backend = backend
+# class FrontEnd:
+# def __init__(self, back_end):
+# self.back_end = back_end
7
8
# def display_data(self):
9
-# data = self.backend.get_data_from_database()
+# data = self.back_end.get_data_from_database()
10
# print("Display data:", data)
11
12
13
-# class Backend:
+# class BackEnd:
14
# def get_data_from_database(self):
15
# """Return data from the database."""
16
# return "Data from the database"
17
18
19
# Good example
20
-class Frontend:
+class FrontEnd:
21
def __init__(self, data_source):
22
self.data_source = data_source
23
0 commit comments