Passed
Push — master ( db2481...3bd527 )
by Fabio
03:28
created

benedict.core.swap.swap()   A

Complexity

Conditions 2

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
nop 3
1
# -*- coding: utf-8 -*-
2
3
4
def swap(d, key1, key2):
5
    if key1 == key2:
6
        return
7
    d[key1], d[key2] = d[key2], d[key1]