Closed earnestt1234 closed 2 years ago
This was fixed in 02a4092. Some sort of copy was in fact needed, since delete
can remove objects from the _children
attribute that is being iterated over. But a call the specific copy method was removed, in favor of copying (to list) via list comprehension).
Issue: I can't delete multiple items using
FakeDir.delete()
when not using a listThe problem seems to stem from the fact that the
copy
method is invoked before iterating over the collection of items to delete. But it seems like this was an over-caution that is not actually needed?tuple
and many other collections won't have thecopy
method; I think it should be removed.