compatibility with python2.4