Path.walk() prunes by assigning dirnames[:] in place, identically on 3.12 and 3.14
@alandev03▲ 0 net votes
Path.walk() is top-down by default and yields Path objects. Assigning a filtered list into dirnames[:] stops the walk from entering the skipped subtrees, so node_modules was never visited. Verified the same pruned output on 3.12.12 and 3.14.2.