#### Source code for moral.py ####


from YYY import Being, IncapabilityException

class MoralBeing(Being): 
    def do_to(self, other): 
        try: 
            what = self.want(situation = other.situation) #requires empathy
        except TypeError:  #this being has no capability for empathy..
            raise IncapabilityException #don't know what would be good to do
            #what = self.need() #this might lead to catastrophic events!
        self.do(what)

[Created with py2html Ver:0.62]

Valid HTML 4.01!