Python AttributeError in using a member variable
<p>I am having an issue with Python throwing an AttributeError on accessing a variable.</p>

<p>The code is below, redacted for clarity.</p>

<pre><code>class mycollection(object):
    """
    Collection of stuff. 
    """
    #"compile-time" define class variables.
    __slots__ = ["stuff_list"]

    def __init__(self):
        self.stuff_list = []

    def add_stuff(self, stuff):
        self.stuff_list.append(stuff)


#later on..
collection = mycollection()
stuff = stuff()
collection.add_stuff(stuff)
</code></pre>

<p>Generating this error.    </p>

<pre><code>Traceback (most recent call last):
  File "", line 210, in &lt;module&gt;
    main()
  File "", line 206, in main
    thestuff = load_file(inputfile, filetype)
  File "pyyft.py", line 121, in load_file
    collection.add_stuff(stuff)
  File "pyyft.py", line 55, in add_test
    self.stuff_list.append(stuff)
AttributeError: stuff_list
</code></pre>

<p>Checking through the <a href="http://docs.python.org/reference/expressions.html#attribute-references" rel="nofollow">documentation</a>, I don't understand why this error is arising.</p>
