[issue6475] Documentation > Tutorial > List Comprehensions

2009-07-13 Thread Georg Brandl
Georg Brandl added the comment: Retro, you still won't give up, will you? -- status: pending -> closed ___ Python tracker ___ ___ Pyth

[issue6475] Documentation > Tutorial > List Comprehensions

2009-07-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue6475] Documentation > Tutorial > List Comprehensions

2009-07-13 Thread Mark Dickinson
Mark Dickinson added the comment: > I think that the fresh fruits can really be considered as dangerous > weapons. Indeed. Google for "monty python self-defence against fresh fruit". -- nosy: +marketdickinson status: pending -> open ___ Python trac

[issue6475] Documentation > Tutorial > List Comprehensions

2009-07-13 Thread Ezio Melotti
Ezio Melotti added the comment: That example was introduced in r16743 as: >>> spcs = [" Apple", " Banana ", "Coco nut "] >>> print [s.strip() for s in spcs] ['Apple', 'Banana', 'Coco nut'] and was changed in r16831 to: >>> freshfruit = [' banana', ' loganberry ', 'passion fruit '] >>> [w

[issue6475] Documentation > Tutorial > List Comprehensions

2009-07-13 Thread Retro
New submission from Retro : There's a mistake in the code snippet: >>> freshfruit = [' banana', ' loganberry ', 'passion fruit '] >>> [weapon.strip() for weapon in freshfruit] ['banana', 'loganberry', 'passion fruit'] The second line should be: >>> [fruit.strip() for fruit in freshfruit] ['