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

benedict.core.swap   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 8
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A swap() 0 4 2
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]