Antoine Pitrou <pit...@free.fr> added the comment:

> An errno+ferror approach works except for two cases:
> 
>   (1) MS fgets() does not consider reading from a write-only stream
>       an error. While annoying, I think this is standard conforming.
> 
>   (2) OpenSolaris sets errno unreliably after getc.
> 
> 
> I do not know how to get around those without using OS specifics.

Ok, then perhaps it's better to have some internal {readable, writable}
flags based on the original mode string.

----------

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

Reply via email to