[docs] map objects are not lists

Chris Jerdonek chris.jerdonek at gmail.com
Fri Sep 28 05:52:59 CEST 2012


> Date: 2012年9月20日 15:14:36 -0400
> From: Aaron Leanhardt <aaron at leanhardtingenuities.com>
> Subject: [docs] map objects are not lists
>> 5.1.3. List Comprehensions<http://docs.python.org/dev/tutorial/datastructures.html#list-comprehensions>
>> ...
>> This is also equivalent to squares = map(lambda x: x**2, range(10)), but
> it?s more concise and readable.
>>> I think that the last sentence above should read:
>> squares = list(map(lambda x: x**2, range(10)))

Hi Aaron, thanks for the report. I created an issue in the tracker
for this here:
http://bugs.python.org/issue16073
--Chris


More information about the docs mailing list

AltStyle によって変換されたページ (->オリジナル) /