Sworddragon added the comment: It sounds like me that "del dir_list" does only delete the copied list while "del dir_list[:]" accesses the reference and deletes this list. If I'm not wrong with this assumption I think you was meaning dir_list instead of root_dir in your post.
But thanks for the help as I have not expected this on reading just the documentation of os.walk(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20764> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com