Iteration over class attributes
<p>I have a class <code>abalone</code> with three attributes <code>M</code>, <code>I</code> and <code>F</code>. Accessing them like so:</p>

<pre><code>abalone.M
Out[81]:
array([[ 0.455 ,  0.365 ,  0.095 , ...,  0.2245,  0.101 ,  0.15  ],
       [ 0.35  ,  0.265 ,  0.09  , ...,  0.0995,  0.0485,  0.07  ],
       [ 0.44  ,  0.365 ,  0.125 , ...,  0.2155,  0.114 ,  0.155 ],
       ..., 
       [ 0.59  ,  0.44  ,  0.135 , ...,  0.439 ,  0.2145,  0.2605],
       [ 0.6   ,  0.475 ,  0.205 , ...,  0.5255,  0.2875,  0.308 ],
       [ 0.71  ,  0.555 ,  0.195 , ...,  0.9455,  0.3765,  0.495 ]])
</code></pre>

<p>works splendidly. How would I go about iterating over them? My try</p>

<pre><code>for item in [M, I, F]:
    abalone.item
    ---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
&lt;ipython-input-84-c9c2187c3451&gt; in &lt;module&gt;()
----&gt; 1 for item in [M, I, F]:
      2     abalone.item

NameError: name 'M' is not defined
</code></pre>

<p>doesn't work unfortunately.</p>

<p>Edit: Trying</p>

<pre><code>for item in ['M', 'I', 'F']:
    abalone.item
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
&lt;ipython-input-86-b9d61335686f&gt; in &lt;module&gt;()
      1 for item in ['M', 'I', 'F']:
----&gt; 2     abalone.item

AttributeError: 'Abalone' object has no attribute 'item'
</code></pre>

<p>does not work either.</p>