nodemap.py
def to_int(data, key_or_idx=None):
    """ Change ints-as-strs in nested python lists/dicts to ints
    
        NB: modifies data in place and returns None
    """
    if key_or_idx is None:
        value = data
    else:
        value = data[key_or_idx]
    if isinstance(value, list):
        for idx, v in enumerate(value):
            to_int(value, idx)
    elif isinstance(value, dict):
        for k, v in value.iteritems():
            to_int(value, k)
    elif isinstance(value, str):
        if value.isdigit():
            data[key_or_idx] = int(value)
        return
 Change ints-as-strs in nested python lists/dicts to ints
    
        NB: modifies data in place and returns None
    
Change ints-as-strs in nested python lists/dicts to ints
NB: modifies data in place and returns None
Change ints - as - strs in nested python lists / dicts to ints NB : modifies data in place and returns None
def to_int(data, key_or_idx=None):
    if key_or_idx is None:
        value = data
    else:
        value = data[key_or_idx]
    if isinstance(value, list):
        for idx, v in enumerate(value):
            to_int(value, idx)
    elif isinstance(value, dict):
        for k, v in value.iteritems():
            to_int(value, k)
    elif isinstance(value, str):
        if value.isdigit():
            data[key_or_idx] = int(value)
        return
def to_int ( data , key_or_idx = None ) : if key_or_idx is None : value = data else : value = data [ key_or_idx ] if isinstance ( value , list ) : for idx , v in enumerate ( value ) : to_int ( value , idx ) elif isinstance ( value , dict ) : for k , v in value . iteritems ( ) : to_int ( value , k ) elif isinstance ( value , str ) : if value . isdigit ( ) : data [ key_or_idx ] = int ( value ) return
Change ints-as-strs in nested python lists/dicts to ints
NB: modifies data in place and returns None
Change ints - as - strs in nested python lists / dicts to ints NB : modifies data in place and returns None
""" Change ints-as-strs in nested python lists/dicts to ints
    
        NB: modifies data in place and returns None
    """
data
key_or_idx