On 7/25/19, Kirill Balunov <kirillbalu...@gmail.com> wrote:
>
>>>> import os
>>>> from pathlib import Path
>>>> dummy = " "   # or "" or "     "
>>>> os.path.isdir(dummy)
> False
>>>> Path(dummy).is_dir()
> True

I can't reproduce the above result in either Linux or Windows. The
results should only be different for an empty path string, since
Path('') is the same as Path('.'). The results should be the same for
Path(" "), depending on whether a directory named " " exists (normally
not allowed in Windows, but Linux allows it).
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to