diff options
author | Nice Zombies <nineteendo19d0@gmail.com> | 2024-04-09 10:27:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-09 10:27:14 +0200 |
commit | 99852d9e65aef11fed4bb7bd064e2218220f1ac9 (patch) | |
tree | a38d466c53bd8d9904462f11d2bc1c3ec2405325 /Lib/ntpath.py | |
parent | 19a22020676a599e1c92a24f841196645ddd9895 (diff) | |
download | cpython-99852d9e65aef11fed4bb7bd064e2218220f1ac9.tar.gz cpython-99852d9e65aef11fed4bb7bd064e2218220f1ac9.zip |
gh-117648: Improve performance of os.join (#117654)
Replace map() with a method call in the loop body.
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r-- | Lib/ntpath.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index f9f6c78566e..da5231ff2c0 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -111,7 +111,7 @@ def join(path, *paths): if not paths: path[:0] + sep #23780: Ensure compatible data type even if p is null. result_drive, result_root, result_path = splitroot(path) - for p in map(os.fspath, paths): + for p in paths: p_drive, p_root, p_path = splitroot(p) if p_root: # Second path is absolute |