Movatterモバイル変換
[0]ホーム
[Python-Dev] C-API functions for reading/writing tstate->exc_* ?
Nick Coghlanncoghlan at gmail.com
Sun Feb 19 15:31:04 CET 2012
On Mon, Feb 20, 2012 at 12:18 AM, Paul Moore <p.f.moore at gmail.com> wrote:> Of course, you could always go through the Python API, getting the sys> module, extracting the relevant functions and calling them using the> abstract API. That's what I'd recommend if this were purely a CPython> question. But I assume that (for some reason) that's not appropriate> for PyPy.I had the same thought, but it actually only works cleanly for the"fetch" half of the equation. You'd have to muck around with actuallyraising an exception to handle *setting* those fields, which is*really* relying on implementation details). That said, it may beworth further exploring the idea of invoking appropriate snippets ofPython code to get the desired effect.My other question would be whether there's an existing *private* C APIwith the desired behaviour that could be made public, or if this wouldbe a genuinely new addition to the API.Cheers,Nick.-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Devmailing list
[8]ページ先頭