Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Run the following program
importinspectimportinspect_, lineno1=inspect.getsourcelines(inspect.currentframe()) _, lineno2=inspect.findsource(inspect.currentframe()) print(lineno1, lineno2)Expected Result
The line numbers are expected to be 1-based, so the expected output is 1 1.
Actual Result
The actual output is 0 0.
Related discussion: #103226
Your environment
- CPython versions tested on:
mainbranch - Operating system and architecture: macOS
Linked PRs
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
No status