Ned Deily added the comment:

Yes, I did indeed mean "dir_list", not "root_dir".  Sorry for the confusion.  
One point: there is no "copied list".  "del dir_list" merely deletes the 
binding between the name "dir_list" and the list object returned by "os.walk"; 
the list object itself is unaltered but can no longer be referenced by the name 
dir_list.  "del dir_list[:]" mutates the list object pointed to by dir_list by 
deleting the references to all of its member elements, turning it into an empty 
list; the binding of the list object to the name dir_list remains.

----------

_______________________________________
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

Reply via email to