Carl Andersson <carl.a...@icloud.com> added the comment:
I can see the point in keeping the behaviour close to the OS-level commands, but the discrepancy between os.mkdir (or os.makedirs) and os.path.dirname is not resolved. I still think that >>> os.makedirs(os.path.dirname(filename), exist_ok=True) should be able to handle the case when "filename" does not contain any directories. A possible workaround would be to use os.path.abspath somewhere in the mix. In my humble opinion creating the directory structure required to write a file should not require this level of complexity, since it is such a common operation. ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33968> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com