New submission from Raymond Hettinger <raymond.hettin...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue15084> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com