We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/piglei/one-python-craftsman/blob/master/zh_CN/2-if-else-block-secrets.md 第二篇里面的第四节,使用 try/while/for 中 else 分支,第一段函数里面,抛出异常的话应该就直接return了,怎么样都不会运行到do_the_second_thing()了吧。
The text was updated successfully, but these errors were encountered:
do_the_second_thing() 应该是在未抛出异常时执行,不是抛出异常的时候。
do_the_second_thing()
Sorry, something went wrong.
既然只有未抛出异常的时候才会执行下去,为什么还要判断if first_thing_successed呢
在这段代码里面,确实是这样。😂 我觉得这段代码只适合作为 demo 理解,如果调整一下 except 里的逻辑可能会更好一些。
No branches or pull requests
https://github.com/piglei/one-python-craftsman/blob/master/zh_CN/2-if-else-block-secrets.md
第二篇里面的第四节,使用 try/while/for 中 else 分支,第一段函数里面,抛出异常的话应该就直接return了,怎么样都不会运行到do_the_second_thing()了吧。
The text was updated successfully, but these errors were encountered: