title: Appending to self has no effect after exiting class method
body: <p>I'm trying to define a class method which assigns a random list of numbers to a given (pre-existing) object, in order for it to run under MicroPython in an ESP8266. The issue I'm facing is the value of this object is empty after several <code>append()</code>s. The code I'm using goes as follows:</p>
  
  <pre><code>from urandom import getrandbits
  
  class Buffer(list):
      def randomize(self, randdims):
          bits, nelem = 8, 1
          self = Buffer() # In case self had previous content.
          for n in randdims: nelem *= n
          for _ in range(randdims[0]):
              self.append([
                  ((getrandbits(bits) / (2 ** bits)) * 2) - 1
                  for _ in range(n_elem // randdims[0])
              ])
  </code></pre>
  
  <p>but after running this method like</p>
  
  <pre><code>&gt;&gt;&gt; buf = Buffer((1,2,3,4))
  &gt;&gt;&gt; print(buf.randomize((2,3)))
  [1,2,3,4] # instead of a random series of numbers.
  </code></pre>
  
  <p><code>self</code> does not seem to have changed at all, even though it grew in each iteration. Why would <code>self</code> be incremented inside the loop but not after exiting the method?</p>