Giampaolo Rodola' <g.rod...@gmail.com> added the comment:
PR-17098 basically reverts https://bugs.python.org/issue33695. Not good. =) I think we can simply consume the iterator immediately as in: def copytree(src, ...): with os.scandir(src) as itr: entries = list(itr) return _copytree(entries=entries, ...) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38688> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com