Skip to content

F-string debug mode does not print correctly when in last line of fileย #105831

@lysnikolaou

Description

@lysnikolaou

Where there's an f-string that has a debug expression in the last line of a file, the debug expression buffer is one character too short. For example:

```python3
cpython on ๎‚  main via C v14.0.3-clang via ๐Ÿ pyenv 3.11.3 took 15s 
โฏ cat tmp/t.py
print(f'''{
3
=}''')%                                                                                                                                                                                                                                                                                                                                                                                                         

cpython on ๎‚  main via C v14.0.3-clang via ๐Ÿ pyenv 3.11.3 
โฏ ./python.exe tmp/t.py            

3
3

A fix is already up as part of gh-105828, so just opening this to track the issue.

Linked PRs

Metadata

Metadata

Assignees

Labels

type-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy