Charles-François Natali added the comment: > Richard Oudkerk added the comment: > > I can't remember why I did not use fstat() -- probably it did not occur to me.
I probably have Alzeihmer, I was sure I heard a reasonable case for dup() vs fstat(). The only thing I can think of is that fstat() can incur I/O, whereas dup() shouldn't. In any case, I too prefer fstat(), since it doesn't require creating a new FD (which could fail with EMFILE/ENFILE), and is more logical. The only comment I have about this patch is I think that the helper function to detect the number of open FD might have its place in test.support. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18174> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com