def __getitem__(self, (ctype, skey)):
        if skey == self.key: return self.records[ctype][0][skey]
        t = filter(lambda x, p=self.key, s=skey: x[p] == s, self.records[ctype])
        if not t or len(t) > 1:
            raise KeyError, "invalid key ('%s', '%s')" % (ctype, skey)
        return t[0]
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/dbexts.py/IniParser.__getitem__/original