title: How to share behavior b/w classes in python?
body: <p>Like in ruby we have module which can be included in any given class and then we can use the methods defined there, this saves us from inheritance which is considered as a coupling. In python is there any way to replicate same functionality? For eg I have two classes</p>
  
  <pre><code>class A:
      pass
  
  class B:
      pass            
  </code></pre>
  
  <p>I want to have both of the above two classes to have logging functionality which may be like:</p>
  
  <pre><code>def log(message):
      print message
  </code></pre>