consider-swap-variables / R1712#
Consider using tuple unpacking for swapping variables
You do not have to use a temporary variable in order to swap variables. Using "tuple unpacking" to directly swap variables makes the intention more clear.
a = 1 b = 2 a, b = b, a
a = 1 b = 2 temp = a # [consider-swap-variables] a = b b = temp
Created by the refactoring checker.