Andrei Kulakov <andrei....@gmail.com> added the comment:

Generally if Path is created with a trailing separator, I think it should error 
out for all methods that apply to files, for example `.touch()`, `read*()`, 
`write*()`, others.

This is consistent with shell commands:

touch xyz/                                                                      
 touch: xyz/: Not a directory 

echo 'blah' > xyz/                                                              
 
zsh: not a directory: xyz/

----------

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

Reply via email to