Getting all possible value combinations
<p>For an automatic test thing, I have a class with ~15 parameters. I want to automatically generate instances of the class for every possible value combination. For instance, if the class was defined like so:</p>

<pre><code>class meep():
    def __init__(self):
        self.par1 = 0 # can be in range {0-3}
        self.par2 = 1 # can be in range {1-2}
        self.par3 = a # can be in range {a-c}
</code></pre>

<p>What is the most efficient to get instances of it with all possible value combinations? (IE </p>

<pre><code>inst1=(par1=0,par2=1,par3=a), 
inst2=(par1=0,par2=1,par3=b), 
inst3=(par1=0,par2=1,par3=c),
inst4=(par1=1,par2=1,par3=a), 
inst5=(par1=1,par2=1,par3=b), 
inst6=(par1=1,par2=1,par3=c),
</code></pre>

<p>etc.)</p>
