-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Hi,
I really feel puzzled by this behaviour:
>>> print(f'{True == True=}')
True == True=True
>>> print(f'{True != True=}')
True False
I expected that the output of print(f'{True != True=}')
would be True != True=False
.
According to docs, "[t]o display both the expression text and its value after evaluation, (useful in debugging), an equal sign '=' may be added after the expression". So print(f'{True != True=}')
fails because the expression text is not fully displayed -- even "=" is omitted.
Sorry if this is a duplicate -- I was not able to find any other report here and in Cython issue tracker.
Thank you.
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
macOS
Linked PRs
- gh-129093: Fix f-string debug text sometimes getting cut off when expression contains
!
#129159 - [3.13] gh-129093: Fix f-string debug text sometimes getting cut off when expression contains
!
(GH-129159) #129163 - [3.12] gh-129093: Fix f-string debug text sometimes getting cut off when expression contains ! #129164
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error