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

Appearance settings

Error in description of f-string "=" functionality #125496

Copy link
Copy link
@ericvsmith

Description

@ericvsmith
Issue body actions

https://docs.python.org/3/reference/lexical_analysis.html#f-strings

The description of the "=" functionality says:

By default, the '=' causes the repr() of the expression to be provided, unless there is a format specified. When a format is specified it defaults to the str() of the expression unless a conversion '!r' is declared.

But that's not correct. If a format is specified, it uses value.__format__(format_spec).

I'll produce a patch.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dirDocumentation in the Doc dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)

Projects

Status

Todo
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.