On Wed, Jan 13, 2021, at 08:31, Antonio Cavallo wrote:
> Hi,
> I've found myself typing too many time this:
> pathlib.Path("some-dir-name").mkdir(parent=True, exist_ok=True)
> 
> Wouldn't be better to have a pathlib.Path.makedirs with parent/exist_ok 
> set to True by default?

Worth mentioning, that os.makedirs does not set exist_ok to True by default. I 
have been baffled by this decision, but not following it in pathlib would 
arguably be an inconsistency.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/BMN2A2FMDIMAZ3F62BYFP73CR3T3WK5F/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to