def Opt(re):
 result = Alt(re, Empty)
 result.str = ('Opt(%s)' % re)
 return result

def Opt ( re ) : result = Alt ( re , Empty ) result . str = ( 'Opt(%s)' % re ) return result
opt is an re which matches either |re| or the empty string .