separate out python's weird way of handling self
lots of minor parser work