def loc_end(self, loc_end): if isinstance(loc_end, str): loc_end = splitloc(loc_end) assert loc_end is None or isinstance(loc_end, Loc) self._loc_end = loc_end
def loc(self, loc): if isinstance(loc, str): loc = splitloc(loc) assert loc is None or isinstance(loc, Loc) self._loc = loc