method: code.Traceback.recursionindex

*Not documented*
    def recursionindex(self):

origin: code.Traceback

where:

function source:

def recursionindex(self):
    cache = {}
    for i, entry in py.builtin.enumerate(self):
        key = entry.frame.code.path, entry.lineno 
        #print "checking for recursion at", key
        l = cache.setdefault(key, [])
        if l: 
            f = entry.frame
            loc = f.f_locals
            for otherloc in l: 
                if f.is_true(f.eval(co_equal, 
                    __recursioncache_locals_1=loc,
                    __recursioncache_locals_2=otherloc)):
                    return i 
        l.append(entry.frame.f_locals)
    return None

call sites:

called in /home/johnny/projects/merlinux/py/dist/py/code/testing/test_excinfo.py

traceback code.Traceback.recursionindex.0