bpo-28307: Convert simple C-style formatting with literal format into f-string. (GH-5012)

C-style formatting with literal format containing only format codes
%s, %r and %a (with optional width, precision and alignment)
will be converted to an equivalent f-string expression.

It can speed up formatting more than 2 times by eliminating
runtime parsing of the format string and creating temporary tuple.
This commit is contained in:
Serhiy Storchaka 2021-05-08 22:33:10 +03:00 committed by GitHub
parent 6692dc1ca9
commit a0bd9e9c11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2391 additions and 2166 deletions

File diff suppressed because it is too large Load diff