[issue17735] inspect.findsource throws IndexError

2013-04-15 Thread Kyle Simpson
New submission from Kyle Simpson: Here is one way to reproduce this bug: 1. Create a module file (bug.py in this example) def func(): pass 2. Run Python import bug help(bug) 3. Edit bug.py def func(): pass def newfunc(): pass 4. Use the same Python interpreter as in step 2

[issue17735] inspect.findsource throws IndexError

2013-04-15 Thread R. David Murray
R. David Murray added the comment: Can you explain what makes this one a different problem? It looks like the same one to me. Or is your intent in this issue just to avoid the exception? In that case it seems to me it would better to fix issue 1218234 if we can. -- nosy:

[issue17735] inspect.findsource throws IndexError

2013-04-15 Thread Kyle Simpson
Kyle Simpson added the comment: Right, this issue is about the IndexError. The current patch for issue 1218234 doesn't solve this problem. You will still get IndexErrors, but you will get them when functions are removed rather than when functions are added. I think we should simply throw an