bpo-38693: Use f-strings instead of str.format() within importlib (#17058)

This is a small performance improvement, especially for one or two hot
places such as _handle_fromlist() that are called a lot and the
.format() method was being used just to join two strings with a dot.

Otherwise it is merely a readability improvement.

We keep `_ERR_MSG` and `_ERR_MSG_PREFIX` as those may be used elsewhere for canonical looking error messages.
This commit is contained in:
Gregory P. Smith 2022-10-06 16:43:16 -07:00 committed by GitHub
parent 21a2d9ff55
commit 683ab85955
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1807 additions and 26 deletions

1783
Python/importlib.h Normal file

File diff suppressed because it is too large Load diff