AB-CE / abce

Agent-based computational Economics, the Python library that makes AB modelling easier
http://abce.readthedocs.io
181 stars 62 forks source link

issue with printing offer #170

Closed Sirorezka closed 5 years ago

Sirorezka commented 5 years ago

class Offer(object) in trade.py have error in __repr__ method:

My suggestion for fixing above would be:

    def __repr__(self):
        i_fin_quant = str(self.final_quantity)
        i_status_round = str(self.status_round)

        return ("""<{sender: %s, receiver: %s, good: %s, quantity: %f, price: %f, currency: %s,
                sell: %s, status: %s, final_quantity: %s, id: %i, made: %s, status_round: %s }>""" %
                (self.sender, self.receiver, self.good, self.quantity, self.price, self.currency,
                self.sell, self.status, i_fin_quant, self.id, self.made, i_status_round))