From 7f13cfa6741ce4a3b5557a9bc10de302dabccd90 Mon Sep 17 00:00:00 2001
From: Tim Peters <tim.peters@gmail.com>
Date: Mon, 22 Nov 2004 16:53:46 +0000
Subject: os.walk():  Changed the "sum of bytes consumed by files" example to
 use a generator expression instead of a listcomp.

Not a backport candidate (genexps are new in 2.4).
---
 Doc/lib/libos.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex
index 91923c4..402f678 100644
--- a/Doc/lib/libos.tex
+++ b/Doc/lib/libos.tex
@@ -1174,7 +1174,7 @@ import os
 from os.path import join, getsize
 for root, dirs, files in os.walk('python/Lib/email'):
     print root, "consumes",
-    print sum([getsize(join(root, name)) for name in files]),
+    print sum(getsize(join(root, name)) for name in files),
     print "bytes in", len(files), "non-directory files"
     if 'CVS' in dirs:
         dirs.remove('CVS')  # don't visit CVS directories
-- 
cgit v0.12

