# HG changeset patch # User Paul Boddie # Date 1488306178 -3600 # Node ID 93254c89358b276a5321ddc21120c4d492cb7535 # Parent ba53413ad5de163d7084653a95fd958411844812 Added testing of temporary result variable availability. diff -r ba53413ad5de -r 93254c89358b tests/logical_simple.py --- a/tests/logical_simple.py Tue Feb 28 17:18:48 2017 +0100 +++ b/tests/logical_simple.py Tue Feb 28 19:22:58 2017 +0100 @@ -1,12 +1,18 @@ def no_temp(a, b): return not (a and b) +def uses_temp(a, b): + return a and b + +def also_uses_temp(a, b): + return a or b + a = 1 b = 2 -c = a and b +c = uses_temp(a, b) print c # 2 -d = a or b +d = also_uses_temp(a, b) print d # 1 e = not a