do that in one line: `self.name, self.extension = os.path.splitext(name)`.