Skip to content

Files

Latest commit

 

History

History
31 lines (21 loc) · 692 Bytes

Style-ParallelAssignment.md

File metadata and controls

31 lines (21 loc) · 692 Bytes

Pattern: Use of parallel assignment

Issue: -

Description

Checks for simple usages of parallel assignment. Parallel assignment is less readable than separate assignment.

This will only complain when the number of variables being assigned matched the number of assigning variables.

Examples

# bad
a, b, c = 1, 2, 3
a, b, c = [1, 2, 3]

# good
one, two = *foo
a, b = foo()
a, b = b, a

a = 1
b = 2
c = 3

Further Reading