参考 python in nutshell 的第三版.
1.在python中异常被认为无论什么时候只要能使程序更简单更强大就可以被使用。甚至异常可以被频繁的抛出.
2.在很多语言中,他们所遵从的是"look before you leap" (LBYL),也就是说,在尝试一个操作之前首先应该先检查一下.这里我的理解就是LBYL只是关心语法而不是关心语义的表达。可是python中遵从的是"it's easier to ask forgiveness than permission"既(EAFP),这也是cobol所遵从的,呵呵我在这里的理解是什么都不管先做再说。EAFP更注重语义的表达。
The checks may diminish the readability and clarity of the common, mainstream cases where everything is okay.
The work needed for checking may duplicate a substantial part of the work done in the operation itself.
The programmer might easily err by omitting some needed check.
The situation might change between the moment the checks are performed and the moment the operation is attempted.