Message91877
os.path.join has very basic behavior in the handling of '..'
>>> import os
>>> os.path.join('/foo', '..')
'/foo/..'
For some usecases (comparing paths for example) this is not useful and
you have to manually call normpath on the results:
>>> os.path.normpath(os.path.join('/foo', '..'))
'/'
Because of this code gets littered with annoyingly long chained calls
which are a pain to both read and write.
Is there any problem with join always calling normpath on it's result? |
|
Date |
User |
Action |
Args |
2009-08-22 21:58:20 | michael.foord | set | recipients:
+ michael.foord |
2009-08-22 21:58:20 | michael.foord | set | messageid: <1250978300.82.0.388700146975.issue6764@psf.upfronthosting.co.za> |
2009-08-22 21:58:19 | michael.foord | link | issue6764 messages |
2009-08-22 21:58:19 | michael.foord | create | |
|