-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
The bytecode for an empty f-string does not match the bytecode for an empty normal string.
import dis
dis.dis('""')
dis.dis('f""')Output:
0 0 RESUME 0
1 2 LOAD_CONST 0 ('')
4 RETURN_VALUE
0 0 RESUME 0
1 2 BUILD_STRING 0
4 RETURN_VALUE
Environment
- CPython versions tested on:
3.11, 3.12.0a2
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error