Difference between os.path.isdir and Path.is_dir

Kirill Balunov kirillbalunov at gmail.com
Thu Jul 25 11:27:59 EDT 2019


 Hi all! It is expected that:
```
>>> import os
>>> from pathlib import Path
>>> dummy = " "   # or "" or "     "
>>> os.path.isdir(dummy)
False
>>> Path(dummy).is_dir()
True
```

or was it overlooked?

with kind regards,
-gdg



More information about the Python-list mailing list