environment/lib/python2.7/site-packages/IPython/utils/jsonutil.py
def rekey(dikt):
    """Rekey a dict that has been forced to use str keys where there should be
    ints by json."""
    for k in dikt.iterkeys():
        if isinstance(k, basestring):
            ik=fk=None
            try:
                ik = int(k)
            except ValueError:
                try:
                    fk = float(k)
                except ValueError:
                    continue
            if ik is not None:
                nk = ik
            else:
                nk = fk
            if nk in dikt:
                raise KeyError("already have key %r"%nk)
            dikt[nk] = dikt.pop(k)
    return dikt
def rekey(dikt):
    for k in dikt.iterkeys():
        if isinstance(k, basestring):
            ik=fk=None
            try:
                ik = int(k)
            except ValueError:
                try:
                    fk = float(k)
                except ValueError:
                    continue
            if ik is not None:
                nk = ik
            else:
                nk = fk
            if nk in dikt:
                raise KeyError("already have key %r"%nk)
            dikt[nk] = dikt.pop(k)
    return dikt
def rekey ( dikt ) : for k in dikt . iterkeys ( ) : if isinstance ( k , basestring ) : ik = fk = None try : ik = int ( k ) except ValueError : try : fk = float ( k ) except ValueError : continue if ik is not None : nk = ik else : nk = fk if nk in dikt : raise KeyError ( "already have key %r" % nk ) dikt [ nk ] = dikt . pop ( k ) return dikt
Rekey a dict that has been forced to use str keys where there should be
    ints by json.
Rekey a dict that has been forced to use str keys where there should be ints by json .