From a5524ce1f8daa7d8cc560df6e4c59f20ae6f2ee5 Mon Sep 17 00:00:00 2001 From: Santiago Gala Date: Sun, 14 Dec 2008 21:22:04 +0100 Subject: [PATCH] Make examples consistent with 3.0 --- Doc/howto/functional.rst | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/howto/functional.rst b/Doc/howto/functional.rst index 4dea527..47798e9 100644 --- a/Doc/howto/functional.rst +++ b/Doc/howto/functional.rst @@ -634,7 +634,7 @@ features of generator expressions: ... return s.upper() - >>> map(upper, ['sentence', 'fragment']) + >>> list(map(upper, ['sentence', 'fragment'])) ['SENTENCE', 'FRAGMENT'] >>> [upper(s) for s in ['sentence', 'fragment']] ['SENTENCE', 'FRAGMENT'] @@ -650,7 +650,7 @@ value. >>> def is_even(x): ... return (x % 2) == 0 - >>> filter(is_even, range(10)) + >>> list(filter(is_even, range(10))) [0, 2, 4, 6, 8] -- 1.6.0.4