From 923542b0606efd1f240bebf77cae371e4989b8b7 Mon Sep 17 00:00:00 2001 From: barneygale Date: Wed, 11 Dec 2024 23:44:32 +0000 Subject: [PATCH] Use status.exists() in docs example --- Doc/library/pathlib.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index e719567cc3e72e..f29ef25d9820ff 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -1189,8 +1189,10 @@ Querying file type and status ... print('symlink') ... elif p.status.is_dir(): ... print('directory') + ... elif p.status.exists(): + ... print('something else') ... else: - ... print('other') + ... print('not found') ... directory