This would be better done with "if ident in self._CARPARKS.values():"