code beautification: self.__repr__() -> repr(self); with open