def set_GENDER(self, player, line, target, value):
        try:
            target.gender = getattr(language.Gender, value.upper())
        except AttributeError:
            gender = {language.Gender.MALE: "male",
                      language.Gender.FEMALE: "female",
                      language.Gender.NEUTER: "neuter"}.get(target.gender)
            raise eimaginary.ActionFailure(events.ThatDoesntMakeSense(
                    actor=player.thing,
                    actorMessage=("Only male, female, and neuter are valid "
                                  "genders.  You remain ", gender, ".")))
        else:
            if player.thing is target:
                # XXX Why can't I do something with Noun to collapse these
                # cases?
                event = events.Success(
                    actor=player.thing,
                    actorMessage=(u"You set your gender to ", value, "."))
            else:
                event = events.Success(
                    actor=player.thing,
                    target=target,
                    actorMessage=("You set ", language.Noun(target).hisHer(),
                                  " gender to ", value, "."),
                    targetMessage=(player.thing, " set your gender to ",
                                   value, "."))
            event.broadcast()
Parameters
dataset/ETHPy150Open twisted/imaginary/imaginary/action.py/Set.set_GENDER--crossover with--dataset/ETHPy150Open ejeschke/ginga/ginga/util/mosaic.py/mosaic