def is_eventvar(expr):
 assert isinstance(expr, string_types), (u'%s is not a string' % expr)
 return (re.match(u'^e\\d*$', expr) is not None)

def is_eventvar ( expr ) : assert isinstance ( expr , string_types ) , ( u'%s is not a string' % expr ) return ( re . match ( u'^e\\d*$' , expr ) is not None )
an event variable must be a single lowercase e character followed by zero or more digits .