Issue 929316: many os.path functions bahave inconsistently (original) (raw)
Issue929316
Created on 2004-04-04 18:45 by simon.percivall, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg20425 - (view) | Author: Simon Percivall (simon.percivall) | Date: 2004-04-04 18:45 |
Many os.path functions return different paths before and after applying os.path.normpath/os.path.realpath/os.path.abspath, etc. Functions such as os.path.basename and os.path.dirname will not handle a trailing slash "correctly". >>> dirs = '/usr/local/' >>> os.path.dirname(dirs) '/usr/local' >>> os.path.basename(dirs) '' >>> >>> dirs = os.path.normpath(dirs) >>> os.path.dirname(dirs) '/usr' >>> os.path.basename(dirs) 'local' >>> This should be wrong since normpath/realpath/abspath shouldn't have such an effect on other os.path functions. | ||
msg20426 - (view) | Author: Johannes Gijsbers (jlgijsbers) * ![]() |
Date: 2004-06-05 16:18 |
Logged In: YES user_id=469548 Though this may arguably be wrong, it is the explicitly documented behavior and has been for a long time (see bug #219485). | ||
msg20427 - (view) | Author: A.M. Kuchling (akuchling) * ![]() |
Date: 2004-06-05 16:33 |
Logged In: YES user_id=11375 Closing. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:03 | admin | set | github: 40120 |
2004-04-04 18:45:22 | simon.percivall | create |