From: Guido van Rossum <guido@python.org> Date: Tue, 29 Feb 2000 13:31:16 +0000 (+0000) Subject: Remove some redundant logic from walk() -- there's no need to check X-Git-Tag: v1.6a1~325 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9b2b4be26df7c3da8a20d1a5f4d2b796e455b4b;p=python Remove some redundant logic from walk() -- there's no need to check for "." and "..", since listdir() no longer returns those. --- diff --git a/Lib/posixpath.py b/Lib/posixpath.py index cc0e4cba1f..a603e9ea99 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -263,9 +263,7 @@ of all the files and subdirs in directory "d". except os.error: return func(arg, top, names) - exceptions = ('.', '..') for name in names: - if name not in exceptions: name = join(top, name) st = os.lstat(name) if stat.S_ISDIR(st[stat.ST_MODE]):