Python 27 compatibility