2017年4月第1版

2018年4月第5次印刷

页码:241页

  • 代码段,倒数第一段
  • 原文:
    1. >>> x = 10
    2. >>> try:
    3. ... x = 1 / 0
    4. ... except Exception as e:
    5. ... print(e)
    6. ... finally:
    7. ... print(e)
    8. ... del x
    9. ...
    10. integer division or modulo by zero
    11. del x
  • 修订为:
    1. >>> x = 10
    2. >>> try:
    3. ... x = 1 / 0
    4. ... except ZeroDivisionError as e:
    5. ... print(e)
    6. ... finally:
    7. ... print("del x")
    8. ...
    9. division by zero
    10. del x
  • 感谢读者:362**1
0
文章评论1
登录后发表看法