

def type_cmp(a, b):
    'Python 2 style comparison based on type'
    (ta, tb) = (type(a).__name__, type(b).__name__)
    if (ta == 'str'):
        ta = 'unicode'
    if (tb == 'str'):
        tb = 'unicode'
    if (ta > ta):
        return 1
    elif (ta < tb):
        return (- 1)
    else:
        return 0

dataset/ETHPy150Open RDFLib/rdfextras/rdfextras/py3compat.py type_cmp/VarMisuse@68/96 `tb`->`ta`