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.
Created on 2009年05月07日 07:02 by jyasskin, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| PyFrame_GetLineNumber.patch | jyasskin, 2009年05月07日 07:02 | |||
| Messages (4) | |||
|---|---|---|---|
| msg87360 - (view) | Author: Jeffrey Yasskin (jyasskin) * (Python committer) | Date: 2009年05月07日 07:02 | |
Most uses of PyCode_Addr2Line (http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get the line number of a specified frame, but there's no way to do that directly. Forcing people to go through the code object makes them know more about the guts of the interpreter than they should need. The proposed PyFrame_GetLineNumber provides a more obvious and direct way to do the same thing. If this goes in, we might be able to deprecate PyCode_Addr2Line entirely. The uses of PyCode_Addr2Line that don't get the line of a particular frame seem to be getting the line from a traceback (for example, http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line), which is replaced by the tb_lineno field. |
|||
| msg87434 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2009年05月08日 10:29 | |
Please add doc to the patch, it looks ok otherwise. |
|||
| msg87478 - (view) | Author: Jeffrey Yasskin (jyasskin) * (Python committer) | Date: 2009年05月08日 22:25 | |
Documented and committed as r72488. This should be forward-ported to 3.x also, but since we've already started the betas for 3.1, it should probably wait for 3.2. |
|||
| msg97314 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2010年01月06日 17:31 | |
This was merged in r74132. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:48 | admin | set | github: 50204 |
| 2010年01月06日 17:31:41 | georg.brandl | set | status: open -> closed nosy: + georg.brandl messages: + msg97314 |
| 2009年05月08日 22:25:03 | jyasskin | set | keywords:
- needs review messages: + msg87478 |
| 2009年05月08日 10:29:29 | pitrou | set | assignee: jyasskin versions: + Python 3.1 nosy: + pitrou messages: + msg87434 resolution: accepted stage: patch review -> commit review |
| 2009年05月07日 07:02:42 | jyasskin | create | |