Conditional iteration
Gabriel Genellina
gagsl-py at yahoo.com.ar
Fri Dec 15 05:11:23 EST 2006
More information about the Python-list mailing list
Fri Dec 15 05:11:23 EST 2006
- Previous message (by thread): Conditional iteration
- Next message (by thread): Conditional iteration
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At Friday 15/12/2006 06:51, mystilleef wrote: >This why I prefer functional programming constructs for my >list/sequence processing needs. > >------------------------------------------------------------------------ >is_true = lambda x: x > 0 >map(process_list, filter(is_true, [-2, -1, 0, 1, 2, 3, 4])) >------------------------------------------------------------------------ Be aware that map, filter, and reduce may be dropped in Python 3000. http://www.artima.com/weblogs/viewpost.jsp?thread=98196 (and I won't miss them if gone) -- Gabriel Genellina Softlab SRL __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
- Previous message (by thread): Conditional iteration
- Next message (by thread): Conditional iteration
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list