Charles-François Natali <neolo...@free.fr> added the comment: > I think the O(depth) version is fine. The O(1) version is quite more > complicated, difficult to follow, and it seems less robust (it doesn't > use try/finally and therefore might leak fds if the generator isn't > exhausted before being destroyed).
I agree. > On modern systems you have at least 1024 fds, so the restriction > shouldn't be a problem. Actually, I think you're much more likely to run above the max recursion limit than RLIMIT_NOFILE (OTOH, you don't know how many FDs are already open at the time of the call). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13734> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com