Skip to content

Commit c7f8f13

Browse files
committed
Update 3-tier.py
Now, it can print the product list correctly.
1 parent d16b959 commit c7f8f13

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

3-tier.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ def __init__(self):
3838
def get_product_list(self):
3939
print('PRODUCT LIST:')
4040
for product in self.business_logic.product_list():
41-
#print(product)
42-
yield product
41+
print(product)
4342
print('')
4443

4544
def get_product_information(self, product):
@@ -66,6 +65,12 @@ def main():
6665
main()
6766

6867
### OUTPUT ###
68+
# PRODUCT LIST:
69+
# (Fetching from Data Store)
70+
# cheese
71+
# eggs
72+
# milk
73+
#
6974
# (Fetching from Data Store)
7075
# PRODUCT INFORMATION:
7176
# Name: Cheese, Price: 2.00, Quantity: 10

0 commit comments

Comments
 (0)