Replace map() with a method call in the loop body.
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
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
try:
if not p:
path[:0] + sep #23780: Ensure compatible data type even if p is null.
- for b in map(os.fspath, p):
+ for b in p:
+ b = os.fspath(b)
if b.startswith(sep):
path = b
elif not path or path.endswith(sep):
--- /dev/null
+Speedup :func:`os.path.join` by up to 6% on Windows.