has added a CSV format promotions file when running --promos. Item.py was added for moduling.
This commit is contained in:
13
item.py
Normal file
13
item.py
Normal file
@@ -0,0 +1,13 @@
|
||||
class Item:
|
||||
"""
|
||||
A class representing a product in some supermarket.
|
||||
"""
|
||||
|
||||
def __init__(self, name: str, price: float, manufacturer: str, code: int):
|
||||
self.name: str = name
|
||||
self.price: float = price
|
||||
self.manufacturer: str = manufacturer
|
||||
self.code: int = code
|
||||
|
||||
def __repr__(self):
|
||||
return str((self.name, self.price, self.manufacturer, self.code))
|
Reference in New Issue
Block a user