Serhiy Storchaka added the comment:

> Christopher and Serhiy, I would appreciate if you could kindly explain why 
> your arguments, while applying to my suggestions, do not apply to the 
> following functions:

1. Path.stat() wraps only one function, while Path.read() wraps two functions. 
It's signature should be a sum of open() and read() signatures: 
Path.read(encoding, errors, newline, size) (I have omitted some open's 
parameters). This is a little cumbersome.

2. os.stat() requires `import os`, while open() is builtin.

3. If add Path.read(), what about Path.readlines() and Path.readline()?

4. I believe Path.stat() will be used much more often than Path.read().

5. Path.stat() corresponds to low-level os.stat(), but for low-level os.read() 
the high-level corresponding is FileIO.read(). And this corresponding is much 
more universal and useful.

----------

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

Reply via email to