James Saryerwinnie added the comment:

I confirmed the issue in tip.  One of the issues with the original patch is
that it modifies the tokeneater method used by getblock which won't work
if the first token is any of the special cased tokens in the original patch
('@', 'def', 'class').  I've added additional tests that show where the
original patch fails.

An alternative approach is to check in getsourcelines whether or not we're
dealing with a traceback or frame object in the module scope, and if so,
return the lines of the entire module.  I've attached an updated patch
that implements this along with additional tests.

----------
nosy: +James.Saryerwinnie
Added file: http://bugs.python.org/file30344/issue6700.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6700>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to