def digitsrep(n,b=10):

    # very inefficient if you only work with base 10
    dlist=[]
    if n<=0:
        return [0]
    maxpow=int(floor( log(n)/log(b) + mach_eps ))
    pow=maxpow
    while pow>=0:
        x=int(floor(n // b**pow))
        dlist.append(x)
        n=n-x*b**pow
        pow=pow-1
    return dlist
This ensures that setAttribute calls don't set on* attributes
dataset/ETHPy150Open networkx/networkx/examples/advanced/iterated_dynamical_systems.py/digitsrep--crossover with--dataset/ETHPy150Open mozilla/app-validator/appvalidator/testcases/javascript/instanceactions.py/setAttribute