you could take advantage of pop's default value argument to do self.group = kwargs.pop('group', None)