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.

Title: Py_DisplaySourceLine is not documented
Type: behavior Stage:
Components: Interpreter Core Versions: Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: amaury.forgeotdarc, brett.cannon
Priority: normal Keywords:

Created on 2008-07-11 12:20 by amaury.forgeotdarc, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg69548 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-07-11 12:20
This new function is not documented at all.
And I find the error handling not consistent: when filename is NULL, -1
is returned, but no exception is set.

IMO the return code should be as follow:
- return 1 if a line was printed
- return 0 if the line cannot be found
- return -1 in case of error (when calling PyFile_WriteString); an
exception is set.
msg69556 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-07-11 16:36
The function should be made private as it is not expected to be called
by anyone else but the core.
msg69565 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-07-11 21:46
r64881: Py_DisplaySourceLine is renamed to _Py_DisplaySourceLine
Date User Action Args
2022-04-11 14:56:36adminsetgithub: 47593
2008-07-11 21:46:14amaury.forgeotdarcsetstatus: open -> closed
resolution: fixed
messages: + msg69565
2008-07-11 16:36:45brett.cannonsetassignee: brett.cannon
messages: + msg69556
nosy: + brett.cannon
2008-07-11 12:20:46amaury.forgeotdarccreate