[issue46543] Add sys._getfunc

2022-02-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: > Usually the calling function object should be enough. I want to at least provide some historical context on why sys._getframe() exists. I originally wrote that to support PEP 292 and internationalization in Mailman. This has since been extracted into th

[issue46543] Add sys._getfunc

2022-01-26 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +29129 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30950 ___ Python tracker ___ _

[issue46543] Add sys._getfunc

2022-01-26 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : sys._getframe() has to create frame objects, which is relatively expensive. Usually the calling function object should be enough. See https://github.com/faster-cpython/ideas/discussions/238 -- assignee: Jelle Zijlstra components: Interpreter Core m