#NEWLINE# def event( triggers ) : #NEWLINE# #INDENT# if isinstance ( triggers , basestring ) : #NEWLINE# #INDENT# triggers = [ wrap ] #NEWLINE# #UNINDENT# if ( not isinstance ( triggers , list ) ) : #NEWLINE# #INDENT# raise TypeError ( 'Event must be a trigger string or list of triggers' ) #NEWLINE# #UNINDENT# def wrap( f ) : #NEWLINE# #INDENT# @ functools . wraps ( f ) #NEWLINE# def inner( * args , **kwargs ) : #NEWLINE# #INDENT# return f ( * args , ** kwargs ) #NEWLINE# #UNINDENT# inner . events = triggers #NEWLINE# return inner #NEWLINE# #UNINDENT# return wrap