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

> In Python 3.10, it's possible to call PyFrame_FastToLocalsWithError() on a 
> frame to get all variables as a dictionary.

In 2018, it was decided to *not* document this function: see bpo-19431.

In C, It is possible to call PyObject_GetAttrString(frame, "f_locals") to call 
indirectly _PyFrame_FastToLocalsWithError() and get the dictionary.

----------

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

Reply via email to