This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients cheryl.sabella, docs@python, georg.brandl, pitrou, serhiy.storchaka, vstinner
Date 2017-12-12.11:53:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513079605.59.0.213398074469.issue19431@psf.upfronthosting.co.za>
In-reply-to
Content
frameobject.h is not included in any header file. Some effort was spent for avoiding including it in ceval.h, genobject.h, pystate.h and traceback.h. The whole content of frameobject.h is not available in the limited API. I'm not sure about the status of this API. This is not a very hight level API, but rather a very low level API. If document it, it should be documented on a separate page or on a page together with other low-level API.

> Serhiy: how are you supposed to modify local variables of a frame when these variables are stored in "fast locals"?

Currently you should call PyFrame_FastToLocalsWithError(), modify directly f_locals, and call PyFrame_LocalsToFast(). This is very low-level manipulation. It exposes implementation details (at least you need to access PyFrameObject attributes directly). It should be documented that the most of PyFrame_* API is low-level and implementation specific. PyFrame_GetLineNumber() is an exception.
History
Date User Action Args
2017-12-12 11:53:25serhiy.storchakasetrecipients: + serhiy.storchaka, georg.brandl, pitrou, vstinner, docs@python, cheryl.sabella
2017-12-12 11:53:25serhiy.storchakasetmessageid: <1513079605.59.0.213398074469.issue19431@psf.upfronthosting.co.za>
2017-12-12 11:53:25serhiy.storchakalinkissue19431 messages
2017-12-12 11:53:25serhiy.storchakacreate