mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
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:
parent
21a2d9ff55
commit
683ab85955
3 changed files with 1807 additions and 26 deletions
1783
Python/importlib.h
Normal file
1783
Python/importlib.h
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue