[Python-checkins] cpython (3.2): Use attribute access instead of index access for namedtuple.
georg.brandl
python-checkins at python.org
Mon Aug 1 22:59:21 CEST 2011
http://hg.python.org/cpython/rev/1f9ca1819d7c
changeset: 71679:1f9ca1819d7c
branch: 3.2
parent: 71677:63bd8f42b511
user: Georg Brandl <georg at python.org>
date: Mon Aug 01 22:58:53 2011 +0200
summary:
Use attribute access instead of index access for namedtuple.
files:
Doc/library/stat.rst | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Doc/library/stat.rst b/Doc/library/stat.rst
--- a/Doc/library/stat.rst
+++ b/Doc/library/stat.rst
@@ -87,7 +87,7 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list