STINNER Victor <vstin...@python.org> added the comment:

> PyObject_GetAttrString(frame, "f_locals") doesn't work for PyFrameObject*

Oh, would you mind to elaborate?

Example in Python:

$ ./python
Python 3.11.0a5+ 
>>> import sys
>>> f=sys._getframe()
>>> f.f_locals
{'__name__': '__main__', '__doc__': None, ...}

----------

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

Reply via email to