[Piglit] [PATCH 3/4] gen_const_builtin_equal_tests.py: use enumerate instead of a flag
Ilia Mirkin
imirkin at alum.mit.edu
Mon May 19 15:42:30 PDT 2014
On Mon, May 19, 2014 at 6:12 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> [snip]
>
>> >
>
>> > > + for test_id, x in enumerate(test_vectors, 2):
>
>> > While I'm not totally against this, I'd like you to consider just
>
>> > adding the 2 below to test_id. I believe that I'm fairly knowledgeable
>
>> > about python builtins, and I still had to look that up -- I had never
>
>> > come across it before.
>
>
>
> so enumerate's signature looks like this enumerate(iterable, [start=0]), so
> start can be named explicitly, sould it be better if we said start=2.
Yeah, I like that. I knew about enumerate, just not the start argument.
-ilia
More information about the Piglit
mailing list