def GetItem(self, user, route, has_perm = False, need_perm = False):
        self.CheckUpdate()

        # for normal items, permission does not matter
        if (self.mtitle.find("(BM:") != -1):
            if (Board.Board.IsBM(user, self.mtitle[4:],) or user.IsSysop()):
                has_perm = True
            elif (need_perm and not has_perm):
                return None
        if (self.mtitle.find("(BM: BMS)") != -1
                or self.mtitle.find("(BM: SECRET)") != -1
                or self.mtitle.find("(BM: SYSOPS)") != -1):
            need_perm = True # take effect at next level...

        if (len(route) == 0):
            return self
        target = 1 - route[0]
        _id = target
        if (_id >= len(self.items)):
            return None
        while (self.items[_id].EffectiveId(user) < target):
            _id += 1
            if (_id >= len(self.items)):
                return None
        item = self.items[_id]
        # what the ....
        item.mtitle = item.title
        if (len(route) == 1):
            # last level...
            return item
        else:
            if (item.IsDir()):
                if (not item.CheckUpdate()):
                    return None
                return item.GetItem(user, route[1:], has_perm, need_perm)
            else:
                return None
dataset/ETHPy150Open HenryHu/pybbs/digest.py/DigestItem.GetItem/swapped operands of `-`