[Piglit] [PATCH 3/3] tests/all.py: Make MSAA_SAMPLE_COUNTS a list instead of a tuple
Dylan Baker
baker.dylan.c at gmail.com
Thu Dec 3 11:31:55 PST 2015
On Thu, Dec 03, 2015 at 12:00:11AM -0500, Ilia Mirkin wrote:
> On Wed, Dec 2, 2015 at 9:04 PM, Dylan Baker <dylanx.c.baker at intel.com> wrote:
> > On Wed, Dec 02, 2015 at 06:13:48PM -0500, Ilia Mirkin wrote:
> >> On Wed, Dec 2, 2015 at 5:36 PM, <baker.dylan.c at gmail.com> wrote:
> >> > From: Dylan Baker <baker.dylan.c at gmail.com>
> >> >
> >> > The problem with using MSAA_SAMPLE_COUNTS as a tuple is that it isn't a
> >> > tuple. It's a sequence of like values, and is combined with other
> >> > sequences of values, this is what a list is for.
> >>
> >> Huh? List = mutable, tuple = immutable. This seems immutable, so it
> >> should be a tuple. What am I missing?
> >
> > I had a very lengthy response trying to explain why this should be a
> > list not a tuple, but I think this does a better job of explaining my
> > position:
> > http://news.e-scribe.com/397
>
> So basically because you have some notion that some things should be
> in lists and other things should be in tuples and the current
> arrangement makes you feel icky? FWIW it makes me feel icky whenever I
> see a list used for something that's immutable.
>
> -ilia
Tuples and lists and sets are all distinct, the fact that a tuple is
immutable is an implementation detail of python, not something inherit
to the concept of a tuple. Besides that, it's not really even immutable,
we add '0' and 'all_samples' to the MSAA_SAMPLES_COUNTS collection
multiple times.
I guess the argument is purely academic, but I stand by my assertion
that the data is homogeneous, it should be a list (or ideally perhaps
the non-existent "frozenlist").
Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20151203/9ae559e2/attachment.sig>
More information about the Piglit
mailing list