def bind(self, func, etype):
        '''
        Register @func for execution when events with `.type` of @etype 
        or meta-events with `.utype` of @etype are handled. @func will be 
        called with self, self.gstate, and the event as arguments.
        '''
        self.event_funcs.setdefault(etype, [])
        # Don't add multiple times!
        if func not in self.event_funcs[etype]:
            self.event_funcs[etype].append(func)
def bind ( self , func , etype ) : self . event_funcs . setdefault ( etype , [ ] ) if func not in self . event_funcs [ etype ] : self . event_funcs [ etype ] . append ( func )
Register @func for execution when events with `.type` of @etype 
        or meta-events with `.utype` of @etype are handled. @func will be 
        called with self, self.gstate, and the event as arguments.