fix padding checks for python 2
add comment to help searching for python 2 hacks