From 4fb5ff86eed74e7816f4126d5220830fcbb0a393 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 8 Oct 2015 13:15:07 +0100 Subject: tests: Add test for evaluation order of dictionary key/value pairs. In Python 3.4 the value is evaluated before the key. In Python 3.5 it's key then value. --- tests/basics/python34.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/basics/python34.py') diff --git a/tests/basics/python34.py b/tests/basics/python34.py index 2e9d468b2..7f7a1e015 100644 --- a/tests/basics/python34.py +++ b/tests/basics/python34.py @@ -9,6 +9,9 @@ def print_ret(x): return x f4(*print_ret(['a', 'b']), kw_arg=print_ret(None)) +# test evaluation order of dictionary key/value pair (in 3.4 it's backwards) +{print_ret(1):print_ret(2)} + # from basics/syntaxerror.py # can't have multiple * or ** (in 3.5 we can) def test_syntax(code): -- cgit v1.2.3