Passed
Push — master ( 3eeedc...f26de1 )
by Ken M.
02:03 queued 55s
created

solution_for_anything   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 28
dl 0
loc 41
rs 10
c 0
b 0
f 0
wmc 8

1 Function

Rating   Name   Duplication   Size   Complexity  
A checkio() 0 3 1

7 Methods

Rating   Name   Duplication   Size   Complexity  
A T.__lt__() 0 2 1
A T.__init__() 0 2 1
A T.__gt__() 0 2 1
A T.__ge__() 0 2 1
A T.__eq__() 0 2 1
A T.__ne__() 0 2 1
A T.__le__() 0 2 1
1
class T:
2
    def __init__(self, anything):
3
        pass
4
5
    def __lt__(self, otherthing):
6
        return True
7
8
    def __gt__(self, otherthing):
9
        return True
10
11
    def __ge__(self, otherthing):
12
        return True
13
14
    def __le__(self, otherthing):
15
        return True
16
17
    def __eq__(self, otherthing):
18
        return True
19
20
    def __ne__(self, otherthing):
21
        return True
22
23
24
def checkio(anything):
25
    """Try to return anything else :)."""
26
    return T(anything)
27
28
29
if __name__ == '__main__':  # pragma: no cover
30
    import re
31
    import math
32
33
    assert checkio({}) != [], 'You'
34
    assert checkio('Hello') < 'World', 'will'
35
    assert checkio(80) > 81, 'never'
36
    assert checkio(re) >= re, 'make'
37
    assert checkio(re) <= math, 'this'
38
    assert checkio(5) == ord, ':)'
39
40
    print('NO WAY :(')
41