title: Can I add custom methods/attributes to built-in Python types?
body: <p>For example&mdash;say I want to add a <code>helloWorld()</code> method to Python's dict type. Can I do this?</p>
  
  <p>JavaScript has a prototype object that behaves this way. Maybe it's bad design and I should subclass the dict object, but then it only works on the subclasses and I want it to work on any and all future dictionaries.</p>
  
  <p>Here's how it would go down in JavaScript:</p>
  
  <pre><code>String.prototype.hello = function() {
      alert("Hello, " + this + "!");
  }
  "Jed".hello() //alerts "Hello, Jed!"
  </code></pre>
  
  <p>Here's a useful link with more examples&mdash; <a href="http://www.javascriptkit.com/javatutors/proto3.shtml" rel="noreferrer">http://www.javascriptkit.com/javatutors/proto3.shtml</a></p>