diff --git a/chapter7/bfs_dirtrav.py b/chapter7/bfs_dirtrav.py index 6d6bfeb..37caf90 100644 --- a/chapter7/bfs_dirtrav.py +++ b/chapter7/bfs_dirtrav.py @@ -18,7 +18,7 @@ def files_with_extension(start_directory): items = queue.popleft() for item in items.glob("*"): - # if it is a file and has extension EXT then print + # if item is a file and has extension EXT then print if item.is_file(): if item.suffix == EXT: print(item) diff --git a/chapter7/dfs_dirtrav.py b/chapter7/dfs_dirtrav.py index f598891..0860519 100644 --- a/chapter7/dfs_dirtrav.py +++ b/chapter7/dfs_dirtrav.py @@ -12,7 +12,7 @@ scripts_path = Path.home() / "scripts" def files_with_extension(directory): for item in directory.glob("*"): - # if it is a file and has extension EXT then print + # if item is a file and has extension EXT then print if item.is_file(): if item.suffix == EXT: print(item)