New submission from Alori <valor...@gmail.com>:

pathlib.Path supports deletion of both files (Path.unlink()) and directories 
(Path.rmdir()).

Unfortunately, Path.rmdir() does not allow deletion of non-empty directories 
which means users must use shutil.rmtree() when deleting such paths.

Since pathlib.Path already supports file and (empty) directory deletion, adding 
Path.rmtree(missing_ok=False) would support both the utility and the 
completeness of pathlib.

----------
components: Library (Lib)
messages: 354799
nosy: valorien
priority: normal
severity: normal
status: open
title: Add rmtree() to pathlib.Path
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38499>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to