title: Can I add an operation to a list in Python?
body: <p>I am quite often using Python instead of pseudocode. For that, I would like to have a stack. I know that using lists is the way to go (<a href="http://docs.python.org/tutorial/datastructures.html#using-lists-as-stacks" rel="noreferrer">source</a>), but I would like to use <code>myList.push</code> rather than <code>myList.append</code> to make clear that I use a stack. </p>
  
  <p>I thought I could do something simple like</p>
  
  <pre><code>myList.push = myList.append
  </code></pre>
  
  <p>to define an alias for the append operation, but I get</p>
  
  <pre><code>    stack.push = stack.append
  AttributeError: 'list' object has no attribute 'push'
  </code></pre>
  
  <p>Does a <strong>short</strong> solution for adding a push-operation to a list exist? </p>
  
  <p><sup>(It should not mess up my runnable Python-pseudocode)</sup></p>