Skip to content

Commit 3fa1699

Browse files
Add example for unbalanced-tuple-unpacking message documentation (#6201)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
1 parent 97e5ef1 commit 3fa1699

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fruits = ("orange", "apple", "strawberry", "peer")
2+
orange, apple, strawberry = fruits # [unbalanced-tuple-unpacking]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fruits = ("orange", "apple", "strawberry", "peer")
2+
orange, apple, *remaining_fruits = fruits
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* `PEP 3132 - Extended Iterable Unpacking <https://peps.python.org/pep-3132/>`_

0 commit comments

Comments
 (0)