Python 24 compatibility

Not sure how my tests were passing without this...