python mode update for py3