some py3 fixes, both needed and recommended; we should pass 2to3 as cleanly as possib...