Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

f-string evaluation of conditional expressions with != operator seems to fail #129093

Closed
Labels
3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or error
@JD-Veiga

Description

@JD-Veiga

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 ofprint(f'{True != True=}') would beTrue != True=False.

According todocs, "[t]o displayboth the expression text and its value after evaluation, (useful in debugging), an equal sign '=' may be added after the expression". Soprint(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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp