Change im_self to __self__ for PY3 compat