Ruby style blocks for python