[Python-checkins] r61569 - in sandbox/trunk/2to3/lib2to3: fixes/fix_filter.py tests/test_fixers.py
nnorwitz at gmail.com
Wed Mar 19 17:43:54 CET 2008
On Wed, Mar 19, 2008 at 11:41 AM, Collin Winter <collinw at gmail.com> wrote:
> On Tue, Mar 18, 2008 at 3:01 PM, david.wolever
> <python-checkins at python.org> wrote:
> > Author: david.wolever
> > Date: Tue Mar 18 23:01:27 2008
> > New Revision: 61569
> > Modified:
> > sandbox/trunk/2to3/lib2to3/fixes/fix_filter.py
> > sandbox/trunk/2to3/lib2to3/tests/test_fixers.py
> > Log:
> > Fixed 2to3's handing of filter(None, seq). Now it will return [_f for _f in seq if _f].
> Why that translation? filter(bool, seq) would seem to be more natural.
Probably because David listened to me an that was the first thing I
thought of. :-)
I like the idea of using bool better.
More information about the Python-checkins