From 17b4509564f748b663b31d61cc3614e6bf9ea54d Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 30 Sep 2016 15:00:15 +1000 Subject: [PATCH] tests/basics: Add test constructing a set from a non-trivial expression. --- tests/basics/set1.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/basics/set1.py b/tests/basics/set1.py index 6afd9eb5ef..6ea69e4f05 100644 --- a/tests/basics/set1.py +++ b/tests/basics/set1.py @@ -6,6 +6,10 @@ print(s) s = {3, 4, 3, 1} print(sorted(s)) +# expression in constructor +s = {1 + len(s)} +print(s) + # Sets are not hashable try: {s: 1}