def store(self, *args):
        message = self.spam[self._mailbox][int(args[0] - 1)]
        old_flags = ParseFlags(message["flags"])
        flags = ParseFlags("FLAGS" + args[2])
        if args[1].strip().startswith("+"):
            message["flags"] = "FLAGS (%s)" % " ".join(set(flags + old_flags))
        elif args[1].strip().startswith("-"):
            message["flags"] = "FLAGS (%s)" % " ".join([flag for flag in old_flags if not flag in flags])
implements some flag commands
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/contrib/mockimaplib.py/Connection.store