mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #23780: Improved error message in os.path.join() with single argument.
Idea by R. David Murray.
This commit is contained in:
parent
6baa0a53b0
commit
5bfc03f430
5 changed files with 12 additions and 0 deletions
|
@ -81,6 +81,8 @@ def join(path, *paths):
|
|||
seps = '\\/'
|
||||
colon = ':'
|
||||
try:
|
||||
if not paths:
|
||||
path[:0] + sep #23780: Ensure compatible data type even if p is null.
|
||||
result_drive, result_path = splitdrive(path)
|
||||
for p in paths:
|
||||
p_drive, p_path = splitdrive(p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue