In a recent pull requestfollow_symlinks was added to pathlib.Path.is_dir() & pathlib.Path.is_file() to distinguish symlinks from directories / files.
Adding this to os.path.isdir() was discussed 13 years ago, but this issue wasn’t mentioned when this was added in pathlib.
Has the opinion changed since then, and can we introduce symmetry with pathlib.Path, or should we continue to use os.stat() / pathlib.Path if we want to distinguish from symlinks?
Note: adding it to os.path.exists() is being discussed here.
I added follow_symlinks to Path.is_dir() and is_file() because Path.glob() uses os.scandir() and os.DirEntry.is_dir(follow_symlinks=...), but I wanted to add a private PathBase class that used PathBase.iterdir() and PathBase.is_dir(follow_symlinks=...) instead, so that its globbing implementation is entirely generic. The same motivation doesn’t apply here, so I feel ambivalent about your proposal.