Skip to content

Instantly share code, notes, and snippets.

@a-r-g-v
Created March 9, 2018 12:06
Show Gist options
  • Save a-r-g-v/b03c00e94c7a7ec57fbdbd6e26a1dc07 to your computer and use it in GitHub Desktop.
Save a-r-g-v/b03c00e94c7a7ec57fbdbd6e26a1dc07 to your computer and use it in GitHub Desktop.
Pylint, useless-else-on-loop?
def poe(n):
# W: 7, 4: Else clause on loop without a break statement (useless-else-on-loop)
for i in range(n):
if i == 2:
return i
else:
raise RuntimeError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment