[Tutor] Text processing and functional programming?

Neil Schemenauer nas-pytut at python.ca
Thu Aug 14 11:56:25 EDT 2003


A.M. Kuchling wrote:
> There aren't many built-in functions that return Booleans -- I can't
> think of *any* offhand -- so I never use filter(), only map().

callable() commes to mind.  And bool(). :-)  Hey, I just realized that

    filter(bool, ...)

is the same as the tricky

    filter(None, ...)

Neat.

  Neil



More information about the Tutor mailing list