diff --git a/doc/data/messages/u/unbalanced-tuple-unpacking/bad.py b/doc/data/messages/u/unbalanced-tuple-unpacking/bad.py new file mode 100644 index 0000000000..b927952d94 --- /dev/null +++ b/doc/data/messages/u/unbalanced-tuple-unpacking/bad.py @@ -0,0 +1,2 @@ +fruits = ("orange", "apple", "strawberry", "peer") +orange, apple, strawberry = fruits # [unbalanced-tuple-unpacking] diff --git a/doc/data/messages/u/unbalanced-tuple-unpacking/good.py b/doc/data/messages/u/unbalanced-tuple-unpacking/good.py new file mode 100644 index 0000000000..8f49933d42 --- /dev/null +++ b/doc/data/messages/u/unbalanced-tuple-unpacking/good.py @@ -0,0 +1,2 @@ +fruits = ("orange", "apple", "strawberry", "peer") +orange, apple, *remaining_fruits = fruits diff --git a/doc/data/messages/u/unbalanced-tuple-unpacking/related.rst b/doc/data/messages/u/unbalanced-tuple-unpacking/related.rst new file mode 100644 index 0000000000..449a2e248f --- /dev/null +++ b/doc/data/messages/u/unbalanced-tuple-unpacking/related.rst @@ -0,0 +1 @@ +* `PEP 3132 - Extended Iterable Unpacking `_