[FRPythoneers] iterator like inject:into to generating comma-separated list

Mike Olson Mike.Olson at fourthought.com
Wed Sep 18 02:21:45 MDT 2002


On Tue, 2002-09-17 at 09:51, Cameron Laird wrote:
> > 		.
> I'm actually fond of map and lambda.  For those following
> along at home, let's make clear what a list comprehension
> offers:
>   string.join([str(item) for item in list], '; ')
> or
>   ', '.join([str(element) for element in list])

As am I.  I've never seen too much use for List comprehensions.  To me
(in my biased opinion) I think

string.join(map(str,list),',')

Is much more understandable.  I don't even think there is much
performance gain to doing this with list comprehensions.

Mike

> _______________________________________________
> This message sent by the FRPythoneers mailing list.
> Unsubscribe: echo unsubscribe | FRPythoneers-request at lists.community.tummy.com
> URL: http://lists.community.tummy.com/mailman/listinfo/frpythoneers
-- 
Mike Olson                                Principal Consultant
mike.olson at fourthought.com                +1 303 583 9900 x 102
Fourthought, Inc.                         http://Fourthought.com 
PO Box 270590,                            http://4Suite.org
Louisville, CO 80027-5009, USA
XML strategy, XML tools, knowledge management




More information about the FRPythoneers mailing list