1. class Narzedzia():
  2. def __init__(self, name, year_of_production, price):
  3. self.name = name
  4. self.year_of_production = year_of_production
  5. self.price = price
  6. class Srubokrety(Narzedzia):
  7. def __init__(self, name, year_of_production, price, type):
  8. super().__init__(name, year_of_production, price)
  9. self.type = type
  10. class Klucze(Narzedzia):
  11. def __init__(self, name, year_of_production, price, type):
  12. super().__init__(name, year_of_production, price)
  13. self.type = type
  14. class Wiertarki(Narzedzia):
  15. def __init__(self, name, year_of_production, price, type):
  16. super().__init__(name, year_of_production, price)
  17. self.type = type
  18. class Wartosc():
  19. def __bool__(self):
  20. return True
  21. class Srubki(Srubokrety):
  22. def __init__(self, type):
  23. super().__init__(type)
  24. class Wiertla(Wiertarki):
  25. def __init__(self, type):
  26. super().__init__(type)
  27. class Akumulator(Wiertarki):
  28. def __init__(self, type):
  29. super().__init__(type)
  30. srubo = Srubokrety("Topex", 2015, 20, "PÅ‚aski")