def convert(self, alpha3, country=None, script=None): if (alpha3,) in self.to_podnapisi: return self.to_podnapisi[(alpha3,)] if (alpha3, country) in self.to_podnapisi: return self.to_podnapisi[(alpha3, country)] if (alpha3, country, script) in self.to_podnapisi: return self.to_podnapisi[(alpha3, country, script)] raise LanguageConvertError(alpha3, country, script)
def convert(self, alpha3, country=None, script=None): if alpha3 not in self.to_test: raise LanguageConvertError(alpha3, country, script) return self.to_test[alpha3]