Skip to content

Commit a264c53

Browse files
committed
DR updates, first round
1 parent a3a7f46 commit a264c53

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

solid-principles-python/app_dip.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
from abc import ABC, abstractmethod
22

33
# Bad example
4-
# class Frontend:
5-
# def __init__(self, backend):
6-
# self.backend = backend
4+
# class FrontEnd:
5+
# def __init__(self, back_end):
6+
# self.back_end = back_end
77

88
# def display_data(self):
9-
# data = self.backend.get_data_from_database()
9+
# data = self.back_end.get_data_from_database()
1010
# print("Display data:", data)
1111

1212

13-
# class Backend:
13+
# class BackEnd:
1414
# def get_data_from_database(self):
1515
# """Return data from the database."""
1616
# return "Data from the database"
1717

1818

1919
# Good example
20-
class Frontend:
20+
class FrontEnd:
2121
def __init__(self, data_source):
2222
self.data_source = data_source
2323

0 commit comments

Comments
 (0)