[New-bugs-announce] [issue15084] Add option to os.makefile to not raise an exception for existing directories
Raymond Hettinger
report at bugs.python.org
Sat Jun 16 09:10:50 CEST 2012
New submission from Raymond Hettinger <raymond.hettinger at gmail.com>:
I commonly see the code pattern:
try:
os.mkdir(dirname)
except OSError:
pass
It would be nice to have this instead:
os.mkdir(dirname, ignore_if_existing=True)
There's probably a better name for the keyword argument, but it communicates the idea clearly enough.
----------
messages: 162956
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Add option to os.makefile to not raise an exception for existing directories
type: enhancement
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15084>
_______________________________________
More information about the New-bugs-announce
mailing list