This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ariebovenberg
Recipients ariebovenberg, docs@python, eric.smith, erlendaasland, vinay.sajip
Date 2022-01-02.16:58:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Indeed the `__format__` style offers a lot more options (see

Regarding performance you make an interesting point.

One possible solution is to allow f-strings _only_ if there are no args/kwargs.
In that one case formatting would explicitly be skipped. 
This could be represented at type-level with an overload:

    # case: Logger does formatting. Only literal string template allowed.
    def debugf(msg: Literal[str], *args, exc_info: bool = False, **kwargs):
        # wrap

    # case: User does formatting. No args/kwargs allowed.
    def debugf(msg: str, *, exc_info: bool = False):
        # wrap `msg` in something that will not allow further formatting.
Date User Action Args
2022-01-02 16:58:02ariebovenbergsetrecipients: + ariebovenberg, vinay.sajip, eric.smith, docs@python, erlendaasland
2022-01-02 16:58:01ariebovenbergsetmessageid: <>
2022-01-02 16:58:01ariebovenberglinkissue46200 messages
2022-01-02 16:58:01ariebovenbergcreate