From: Georg Brandl Date: Mon, 1 Aug 2011 20:58:53 +0000 (+0200) Subject: Use attribute access instead of index access for namedtuple. X-Git-Tag: v2.7.3rc1~547 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93d3a8d67ca6818a59b6e20afe2e98d75125f4f7;p=python Use attribute access instead of index access for namedtuple. --- diff --git a/Doc/library/stat.rst b/Doc/library/stat.rst index c9c399e30e..a62d9da107 100644 --- a/Doc/library/stat.rst +++ b/Doc/library/stat.rst @@ -84,7 +84,7 @@ Example:: for f in os.listdir(top): pathname = os.path.join(top, f) - mode = os.stat(pathname)[ST_MODE] + mode = os.stat(pathname).st_mode if S_ISDIR(mode): # It's a directory, recurse into it walktree(pathname, callback)