New submission from Michael Foord <mich...@voidspace.org.uk>: 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? ---------- components: Library (Lib) keywords: easy messages: 91877 nosy: michael.foord severity: normal status: open title: os.path.join should call os.path.normpath on result type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6764> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com