Skip to content

Commit

Permalink
tweak wording
Browse files Browse the repository at this point in the history
  • Loading branch information
dylwil3 committed Jan 18, 2025
1 parent a695aaf commit 945079d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use crate::checkers::ast::Checker;
///
/// ## Why is this bad?
/// The `try`-`except` statement has an `else` clause for code that should
/// run _only_ if no exceptions were raised. Using the `else` clause is more
/// explicit than using a `return` statement inside of a `try` block. In general,
/// it is better to only have code which you expect could throw an exception inside
/// a `try` block to avoid accidentally catching something you didn't expect.
/// run _only_ if no exceptions were raised. Returns in `try` blocks may
/// exhibit confusing or unwanted behavior, such as being overridden by
/// control flow in `except` and `finally` blocks, or unintentionally
/// suppressing an exception.
///
/// ## Example
/// ```python
Expand Down

0 comments on commit 945079d

Please sign in to comment.