Mapping None. Why?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ian Kelly

    #16
    Re: Mapping None. Why?

    On Fri, Jun 13, 2008 at 2:00 PM, Terry Reedy <tjreedy@udel.e duwrote:
    filter(None, iterable) works the same way: None-identity function,
    The immediate reason is the Python has no builtin id().
    But apparently there is also historical precedent in the functional
    community for this convention.
    Another way of viewing it is that filter(None, iterable) applies no
    function at all before testing the truth values, which does make some
    sense. With map, however, this is not strictly true.

    Comment

    Working...