Showing content from http://mail.python.org/pipermail/python-dev/attachments/20100728/2d3d5ced/attachment.html below:
I believe, in design purpose, the os.mkdir() is to match the system call "mkdir()" exactly, the os.makedirs() is a "Super-mkdir", it provides extra convenience for using when we want to create directories. This is the case makedirs() should deal with. A new function maybe confused with makedirs(). <div>
<br></div><div>I think os.makedirs() should go to shutil, but we have missed the right time.</div><div><br><br><div class="gmail_quote">On Wed, Jul 28, 2010 at 3:29 PM, Hrvoje Niksic <span dir="ltr"><<a href="mailto:hrvoje.niksic@avl.com">hrvoje.niksic@avl.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 07/27/2010 06:18 PM, Alexander Belopolsky wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Jul 20, 2010 at 10:20 AM, R. David Murray<<a href="mailto:rdmurray@bitdance.com" target="_blank">rdmurray@bitdance.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'd go with putting it in shutil.<br>
</blockquote>
<br>
+1<br>
<br>
I would also call it shutil.mktree which will go well with<br>
shutil.rmtree next to it.<br>
</blockquote>
<br></div>
Note that mktree is not analogous to rmtree - while rmtree removes a directory tree beneath a specified directory, mktree would only create a single "branch", not an entire tree. I'd imagine a mktree function to accept a data structure describing the tree to be created.<br>
<br>
If you're going for a short name distinctive from mkdir, I propose mksubdirs.<div><div></div><div class="h5"><br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/ysj.ray%2Bpython-dev%40gmail.com" target="_blank">http://mail.python.org/mailman/options/python-dev/ysj.ray%2Bpython-dev%40gmail.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Ray Allen<br>Best wishes!<br>
</div>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4