[issue5586] The documentation of os.makedirs is misleading

2009-04-05 Thread Mher Movsisyan
Mher Movsisyan added the comment: Sorry for confusion. I thought a "leaf directory" is an intermediate-level directory. >>> import os >>> os.makedirs("/tmp/a/b") >>> -- ___ Python tracker

[issue5586] The documentation of os.makedirs is misleading

2009-04-05 Thread Georg Brandl
Georg Brandl added the comment: Actually, it works as documented: >>> import os >>> os.makedirs("/tmp") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '/tmp' -- re

[issue5586] The documentation of os.makedirs is misleading

2009-03-28 Thread Mher Movsisyan
New submission from Mher Movsisyan : The documentation of os.makedirs (http://docs.python.org/library/os.html? highlight=makedirs#os.makedirs) is misleading. It states that os.makedirs raises an exception if the leaf directory already exists but it doesn't. Lib/os.py: 136 def makedirs(name, m