"""Реализация простого класса для чтения из файла""" class FileReader: """Реализация класса для чтения из файла""" def __init__(self, file_path: "str"): """Конструктор класса""" self.file_path: "str" = file_path def __repr__(self) -> "str": """Строковое представления объекта""" return f"FileReader({self.file_path!r})" def read(self) -> "str": """Чтение файла""" try: with open(self.file_path, encoding="utf-8") as des: content: "str" = des.read() except IOError: content = "" return content