This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Arfrever, draghuram, eric.araujo, ggenellina, giampaolo.rodola, gvanrossum, ijmorlan, terry.reedy, ysj.ray, zooko
Date 2010-07-21.02:32:10
SpamBayes Score 0.01079103
Marked as misclassified No
Message-id <1279679533.33.0.762613693552.issue9299@psf.upfronthosting.co.za>
In-reply-to
Content
Discussion has continued on pydev thread "mkdir -p in python". Some suggested a new function. Others questioned the details of the new behavior. Guido prefers the flag approach and imitation of mkdir -p.

"-1 on a new function (despite the constant-argument
guideline) and +1 on a flag. If it weren't for backwards compatibility
I'd just change os.makedirs() to act like mkdir -p period, but the
last opportunity we had for that was Python 3.0."

So, the patch should either leave behavior untouched or imitate -p behavior. That to me says that the parameter passed to mkdirs should be propagated to each mkdir call, as the 9299 patch does, and not set to a fixed value.

OS imports mkdir for one of posix, nt, os2, or ce modules. Since these do not have private '_xx' names and might be imported directly, I think the C-coded mkdir should have the parameter too, as the 9299 patch already does.

The patch changes posixmodule.c. Are all of posix, nt, os2, and ce created from the one file, or is does the patch need to change other C files?

The patch simply augments the very skimpy docstring with
"[, exist_ok=False]". Please add something after "Create a directory." like "If exist_ok is False, raise BlahError if the path already exists." Many doc strings are so terse as to be barely usable, but this is not a requirement. See help(compile) for one that is complete.
History
Date User Action Args
2010-07-21 02:32:13terry.reedysetrecipients: + terry.reedy, gvanrossum, zooko, ggenellina, draghuram, giampaolo.rodola, ijmorlan, eric.araujo, Arfrever, ysj.ray
2010-07-21 02:32:13terry.reedysetmessageid: <1279679533.33.0.762613693552.issue9299@psf.upfronthosting.co.za>
2010-07-21 02:32:11terry.reedylinkissue9299 messages
2010-07-21 02:32:10terry.reedycreate