Stefan Krah <stefan-use...@bytereef.org> added the comment: I see that a complete errno based solution would get messy. To avoid interfering with EAGAIN special cases, this would be needed:
#if defined(EBADF) #define ERRNO_EBADF(x) ((x) == EBADF) #else #define ERRNO_EBADF(x) 0 #endif Then, additional checks would need to be added to get_line, getline_via_fgets and a couple of other places. I think the right thing is to add a field f_modeflags to the file object, to be initialized on creation. Or use f->readable, f->writable like py3k. Thoughts? ---------- _______________________________________ 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