Or we could have 

    @property
    def is_dir(self):
       return self.is_file