DirectObject Does Not Double Accept

In case anyone was wondering (I’m sure I’ll need to remind myself in a few weeks), if an instance that inherits from DirectObject calls accept for the same message, the latter one takes precedence. If you run the code below, only the hello2 handler function gets run.


class listener(DirectObject):
    """
    Test if a class will double accept an event.
    """
    def f1(self):
        self.accept("hello", self.hello1)
        print "accepting hello1"
        
    def f2(self):
        self.accept("hello", self.hello2)
        print "accepting hello2"
        
    def hello1(self):
        print "Hello1"
        
    def hello2(self):
        print "Hello2"
# end

if( __name__ == "__main__" ):
    
    
    l = listener()
    l.f1()
    l.f2()
    
    messenger.send("hello")
    
    run() # run Panda