Created
March 9, 2018 12:06
-
-
Save a-r-g-v/b03c00e94c7a7ec57fbdbd6e26a1dc07 to your computer and use it in GitHub Desktop.
Pylint, useless-else-on-loop?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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