start of python2.6 compat. see #4