def __getitem__(self, section): if self.has_section(section): return RawConfigParser.Section(self, section) raise KeyError(section)