[Stackless] Problem with stackless.frame.co_firstlineno

Tom Locke tom at livelogix.com
Thu Mar 4 09:33:28 CET 2004


I just hit the following error

in inspect.findsource line 435

IndexError: list index out of range
     432:         lnum = object.co_firstlineno - 1
     433:         pat = re.compile(r'^(\s*def\s)|(.*\slambda(:|\s))')
     434:         while lnum > 0:
  -> 435:             if pat.match(lines[lnum]): break
     436:             lnum = lnum - 1
     437:         return lines, lnum

My environment drops me into the debugger. The strange thing is I can go
up the stack one level and call findsource() from the debugger prompt
and it works fine.

Some kind of race hazard?

I haven't isolated code to reproduce this, but I should be able to.

Any ideas?

Tom.



_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list