<p><pre><code>  &#62;&#62;&#62; def print_a(inst):
  ... 	print inst.a
  ... 	
  &#62;&#62;&#62; class Foo(object):
  ... 	def __init__(self, a):
  ... 		self.a = a
  ... 		
  &#62;&#62;&#62; Foo.print_my_a = print_a
  &#62;&#62;&#62; f = Foo(5)
  &#62;&#62;&#62; f.print_my_a()
  5
</code></pre>
Not sure why my previous post was downvoted, unless maybe your definition of monkey-patching is different than mine.