[PEP] matching and mismatching

Luke Kenneth Casson Leighton luke.leighton at aspextechnology.com
Thu May 2 13:39:43 EDT 2002


> On Thu, May 02, 2002 at 05:01:59PM +0000, Luke Kenneth Casson Leighton wrote:
> > for x in ([1,3,2,5,9] matching lambda x:x > 2):
> >       print x
> 
> As another poster has observed, you can use list comprehensions for this
> purpose, as long as constructing the temporary list is palatable.  Of

great!!  thanks jeff, thanks mark.

l.





More information about the Python-list mailing list