array of class

Podi podi.ex at gmail.com
Tue Jan 2 19:05:33 EST 2007


> > Or more compactly:
> >
> > words = [Word(w) for w in 'this is probably what you want'.split()]
> > print words
>
> I didn't want to introduce yet some more "confusing" stuff !-)

Indeed, the for loop is perfectly fine and totally readable. Let's save
the "confusing stuff" to the Perl folks.




More information about the Python-list mailing list