def loads(cls, s: str) -> 'Money':
        """Parse from a string representation (repr)"""
        try:
            currency, amount = s.strip().split()
            return cls(amount, currency)
        except ValueError as err:
            raise ValueError("failed to parse string "
                             " '{}': {}".format(s, err))
def loads ( cls , s : str ) -> 'Money' : try : currency , amount = s . strip ( ) . split ( ) return cls ( amount , currency ) except ValueError as err : raise ValueError ( "failed to parse string " " '{}': {}" . format ( s , err ) )
Parse from a string representation (repr)