This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients terry.reedy
Date 2008-05-04.17:42:02
SpamBayes Score 0.1063825
Marked as misclassified No
Message-id <1209922927.71.0.76492509118.issue2759@psf.upfronthosting.co.za>
In-reply-to
Content
Filter() allows None as a stand-in for either the still-nonexistent
identity() or the now existent bool().  Removing the now redundant
option would slightly simplify the language.  It is certainly a glitch
for newcomers.  Would this option be included if filter were being added
now?

Fixer: I should think filter(None,it) => filter(bool,it) should be
sufficient as I expect filter(f_f_exp, it), where f_f_exp is a filter
function expression that sometimes gives None, should be fairly rare.

Efficiency: filter() could (if it does not now) avoid calling bool twice
internally by checking for bool instead of None).  Even if removing None
is rejected, filter should also check for bool (if it does not now) to
not penalize those who write the obvious filter(bool,it).

If this item is rejected, turn it into a doc item for PEP3099.
History
Date User Action Args
2008-05-04 17:42:08terry.reedysetspambayes_score: 0.106382 -> 0.1063825
recipients: + terry.reedy
2008-05-04 17:42:07terry.reedysetspambayes_score: 0.106382 -> 0.106382
messageid: <1209922927.71.0.76492509118.issue2759@psf.upfronthosting.co.za>
2008-05-04 17:42:06terry.reedylinkissue2759 messages
2008-05-04 17:42:02terry.reedycreate