title: Empty class object in Python
body: <p>I'm teaching a Python class on object-oriented programming and as I'm brushing up on how to explain classes, I saw an empty class definition:</p>
  
  <pre><code>class Employee:
      pass
  </code></pre>
  
  <p>The example then goes on to define a name and other attributes for an object of this class:</p>
  
  <pre><code>john = Employee()
  john.full_name = "john doe"
  </code></pre>
  
  <p>Interesting!</p>
  
  <p>I'm wondering if there's a way to dynamically define a function for an instance of a class like this? something like:</p>
  
  <pre><code>john.greet() = print 'Hello, World!'
  </code></pre>
  
  <p>This doesn't work in my Python interpreter, but is there another way of doing it?</p>