Brett Cannon added the comment: Here is a private function in warnings for calculating the stack depth to the first frame not referencing some key string. Can someone look at it to make sure it looks reasonable?
I'm starting with it being private since it uses sys._getframe() and I don't know how widely needed it is. ---------- keywords: +patch stage: test needed -> patch review versions: -Python 3.4 Added file: http://bugs.python.org/file39196/better_stacklevel.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23810> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com