class Product():
attribute = []
def __init__(self, name = None):
if name :
self.name = name
else:
self.name = "Unknown"
self.description = "None"
self.price = 0
def getName(self):
return self.name
def getDescription(self):
return self.description
class Attribute():
def __init__(self,product, attr):
self.product = product
self.product.attribute.append(attr)
class Color():
def __init__(self):
pass
def Red(self):
return {'color': 'red'}
def Blue(self):
return {'color': 'blue'}
class Size():
def __init__(self):
pass
def Small(self):
return {'size': 'small'}
def Big(self):
return {'site': 'big'}