try except兼容python3