diff options
author | Damien George <damien.p.george@gmail.com> | 2020-01-06 23:26:00 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-01-06 23:26:00 +1100 |
commit | 4d528bbaa836b3d6ec0218ca7f7c92e1bf73704c (patch) | |
tree | 2e3068b48614e8eb16eecbe524139f4ba14a40cb | |
parent | 99b8c1a93731771bd7d8801a8ea939922f3d2991 (diff) |
tests/cpydiff: Add CPy diff-test for using dict.keys() as a set.
See issue #5493.
-rw-r--r-- | tests/cpydiff/types_dict_keys_set.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/cpydiff/types_dict_keys_set.py b/tests/cpydiff/types_dict_keys_set.py new file mode 100644 index 000000000..1a9af9d38 --- /dev/null +++ b/tests/cpydiff/types_dict_keys_set.py @@ -0,0 +1,7 @@ +""" +categories: Types,dict +description: Dictionary keys view does not behave as a set. +cause: Not implemented. +workaround: Explicitly convert keys to a set before using set operations. +""" +print({1:2, 3:4}.keys() & {1}) |