[Piglit] [PATCH 3/4] gen_const_builtin_equal_tests.py: use enumerate instead of a flag

Dylan Baker baker.dylan.c at gmail.com
Mon May 19 15:12:18 PDT 2014


[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.

[snip]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140519/b391a561/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140519/b391a561/attachment.sig>


More information about the Piglit mailing list