- Mastering Objectoriented Python
- Steven F. Lott
- 32字
- 2021-11-12 16:24:58
Tip
When to use catch-all else
Rarely. Use it only when the condition is obvious. When in doubt, be explicit and use else
to raise an exception.
Avoid the vague else
clause.