[Python-Dev] mkdir -p in python

Terry Reedy tjreedy at udel.edu
Tue Jul 20 20:08:52 CEST 2010


On 7/20/2010 12:49 PM, Michael Foord wrote:
> On 20/07/2010 14:43, Nick Coghlan wrote:
>> On Tue, Jul 20, 2010 at 11:09 PM, Steven D'Aprano<steve at pearwood.info>
>> wrote:
>>> I'm -0 on adding an argument to os.makedirs, +0 on adding a variant
>>> function to os, and +0.5 on adding the variant to the shutil module.
>> shutil seems like the place for it to me. The subtlety of getting the
>> error suppression correct makes it worth implementing this once and
>> for all I think.
>
> Really - so we have two almost identical functions with slightly
> different behaviour in different standard library modules? Aren't the
> Python APIs for working with files and paths confused enough already.
> That seems crazy to me and a switch on os.makedirs much more sensible.

Guido has twice approved changing os.makedirs.
First 2 1/2 years ago in
http://bugs.python.org/msg58924  from
http://bugs.python.org/issue1675
and recently in this thread
http://mail.python.org/pipermail/python-dev/2010-July/102027.html
which lead to
http://bugs.python.org/issue9299
Both issues have a patch and I reviewed their major similarities and 
minor differences in
http://bugs.python.org/msg110770

-- 
Terry Jan Reedy



More information about the Python-Dev mailing list