def func(self):
        "Show the current deal"
        caller = self.caller
        partA_offers, partB_offers = self.tradehandler.list()
        count = 1
        partA_offerlist = ""
        for offer in partA_offers:
            partA_offerlist += (count, offer.key) % "\n {w%i{n %s"
            count += 1
        if not partA_offerlist:
            partA_offerlist = "\n <nothing>"
        partB_offerlist = ""
        for offer in partB_offers:
            partB_offerlist += "\n {w%i{n %s" % (count, offer.key)
            count += 1
        if not partB_offerlist:
            partB_offerlist = "\n <nothing>"

        string = "{gOffered by %s:{n%s\n{yOffered by %s:{n%s" % (self.partA.key,
                                                                 partA_offerlist,
                                                                 self.partB.key,
                                                                 partB_offerlist)
        acceptA = self.tradehandler.partA_accepted and "{gYes{n" or "{rNo{n"
        acceptB = self.tradehandler.partB_accepted and "{gYes{n" or "{rNo{n"
        string += "\n\n%s agreed: %s, %s agreed: %s" % \
                                          (self.partA.key, acceptA, self.partB.key, acceptB)
        string += "\n Use 'offer', 'eval' and 'accept'/'decline' to trade. See also 'trade help'."
        caller.msg(string)


# finish
dataset/ETHPy150Open evennia/evennia/evennia/contrib/barter.py/CmdStatus.func/swapped operands of `%`