[issue33968] os.makedirs and empty string

2018-06-26 Thread Carl Andersson
Carl Andersson 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=Tru

[issue33968] os.makedirs and empty string

2018-06-27 Thread Carl Andersson
Carl Andersson added the comment: That is in essence what I am looking for, yes. As you say, it's not pretty. My opinion is still that if the os.path convention is that '' is the same as '.', this should be respected. -- ___ Python tracker

[issue33968] os.makedirs and empty string

2018-06-26 Thread Carl Andersson
New submission from Carl Andersson : os.makedirs does not handle the empty string the same way as the os.path.XX functions does. This is (to me) unexpected behaviour, since calls like `os.makedirs(os.path.dirname(filename), exist_ok=True)` raises an exception if `filename` does not contain