Files
python-uncompyle6/test/simple_source/branching/10_if_else_ternary.py
rocky 9f7d36f8fb Handle Ternary "or". Remove mention of uncompyle3
uncompyle3 removed per Mysterie's request
[Fixes Issue #5]
2016-04-07 07:18:46 -04:00

12 lines
329 B
Python

# Tests:
# ret_expr_or_cond ::= ret_expr
# ret_cond ::= expr POP_JUMP_IF_FALSE expr RETURN_END_IF ret_expr_or_cond
# ret_expr_or_cond ::= ret_cond
# ret_or ::= expr JUMP_IF_TRUE_OR_POP ret_expr_or_cond COME_FROM
# See https://github.com/rocky/python-uncompyle6/issues/5
def minimize(x, y):
return x or (x if x < y else y)