Python implementation of Ruby's delegate.rb