Skip to content

Commit

Permalink
Add example for unbalanced-tuple-unpacking message documentation (#…
Browse files Browse the repository at this point in the history
…6201)


Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
  • Loading branch information
gunungpw and Pierre-Sassoulas authored Apr 6, 2022
1 parent 97e5ef1 commit 3fa1699
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/data/messages/u/unbalanced-tuple-unpacking/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fruits = ("orange", "apple", "strawberry", "peer")
orange, apple, strawberry = fruits # [unbalanced-tuple-unpacking]
2 changes: 2 additions & 0 deletions doc/data/messages/u/unbalanced-tuple-unpacking/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fruits = ("orange", "apple", "strawberry", "peer")
orange, apple, *remaining_fruits = fruits
1 change: 1 addition & 0 deletions doc/data/messages/u/unbalanced-tuple-unpacking/related.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `PEP 3132 - Extended Iterable Unpacking <https://peps.python.org/pep-3132/>`_

0 comments on commit 3fa1699

Please sign in to comment.