def to(self, currency):
if currency == self._currency:<EOL><INDENT>return self<EOL><DEDENT>rate = xrates.quotation(self._currency, currency)<EOL>if rate is None:<EOL><INDENT>raise ExchangeRateNotFound(xrates.backend_name,<EOL>self._currency, currency)<EOL><DEDENT>amount = self._amount * rate<EOL>return self.__class__(amount, currency)<EOL>
Return equivalent money object in another currency