@py2_compatible<EOL>def mymax(val):
while val < <NUM_LIT:100>:<EOL><INDENT>try:<EOL><INDENT>sent = yield val<EOL><DEDENT>except GeneratorExit:<EOL><INDENT>return<EOL><DEDENT>except ValueError:<EOL><INDENT>sent = yield '<STR_LIT>'<EOL><DEDENT>except TypeError:<EOL><INDENT>return_('<STR_LIT>')<EOL><DEDENT>if sent > val:<EOL><INDENT>val = sent<EOL><DEDENT><DEDENT>return_(val * <NUM_LIT:3>)<EOL>
an example generator function