def __init__(self, path, mode='r+'): self.path = os.path.abspath(path) self._mode = mode file.__init__(self, path, mode) self.is_modified = False
def __init__(self, *args, **kwargs): file.__init__(self, *args, **kwargs) self.__class__.open_files.add(self)