[Piglit] [PATCH 2/4] arb_shader_precision: add framework for calculating tolerances for complex functions
baker.dylan.c at gmail.com
Thu Feb 19 11:16:00 PST 2015
On Thu, Feb 19, 2015 at 02:03:41PM -0500, Ilia Mirkin wrote:
> 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)
I agree that list(generator) is ugly, which is why I suggested a list
comprehension, and not a generator comprehension.
> That said, once you start moving to a lambda function, the map loses
> its appeal in improved readability. Similar rationale for filter.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 473 bytes
Desc: Digital signature
More information about the Piglit