diff options
author | Gregory P. Smith <greg@krypto.org> | 2022-10-06 23:43:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-06 23:43:16 (GMT) |
commit | 683ab859554c34831fcecc854de35745d7fd603c (patch) | |
tree | 9327b84ceba87d1c8be5ada8ce7497489c14b444 /Misc/NEWS.d | |
parent | 21a2d9ff550977f2668e2cf1cc15793bf27fa109 (diff) | |
download | cpython-683ab859554c34831fcecc854de35745d7fd603c.zip cpython-683ab859554c34831fcecc854de35745d7fd603c.tar.gz cpython-683ab859554c34831fcecc854de35745d7fd603c.tar.bz2 |
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.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2019-11-04-22-21-27.bpo-38693.w_OAov.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-11-04-22-21-27.bpo-38693.w_OAov.rst b/Misc/NEWS.d/next/Library/2019-11-04-22-21-27.bpo-38693.w_OAov.rst new file mode 100644 index 0000000..6d0ad36 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-11-04-22-21-27.bpo-38693.w_OAov.rst @@ -0,0 +1 @@ +importlib now uses f-strings internally instead of str.format(). |