It's times like these that Python really starts to tick me off. I'm sorry you had to write all this boilerplate.