[Piglit] [PATCH 2/4] arb_shader_precision: add framework for calculating tolerances for complex functions

Ilia Mirkin imirkin at alum.mit.edu
Thu Feb 19 11:03:41 PST 2015

On Thu, Feb 19, 2015 at 12:59 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
>> +            return -1.0 if any(ret['badlands']) else map(float,
>> ret['component_tolerances'])
> Generally at this point python (both upstream and community) discourage
> the use of map and filter, with a preference for comprehensions.
> [float(x) for x in ret['component_tolerances']] should be what you want.

Just to provide a counterpoint, I think that

map(float, fooarray)

is a ton more readable than

list(float(x) for x in fooarray)

That said, once you start moving to a lambda function, the map loses
its appeal in improved readability. Similar rationale for filter.


More information about the Piglit mailing list