def __init__(self,categoryCollection=None): self.allItems = itemData() if categoryCollection is None: loader = categoryLoader() loader.loadFromFile() self.categoryCollection = loader.categoryList self.initialize()
def __init__(self,categoryCollection=None,itemList=None): """ :type itemList: itemData :type categoryCollection: categoryCollection """ self.allItems = itemList self.allSales = None if categoryCollection is None: loader = categoryLoader() loader.loadFromFile() self.categoryCollection = loader.categoryList if itemList is None: print "No item list present!" self.initialize()