-
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from rocky/add-if-or-not
Correct 3.8 weird negation of condition in ifstmt
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Issue 478 of uncompile | ||
"This file is self checking" | ||
# Problem was confusing "a or not b" with | ||
# its negation: "not a or b". | ||
|
||
|
||
def testit(a, b): | ||
if a or not b: | ||
return True | ||
return False | ||
|
||
|
||
assert testit(True, True) is True | ||
assert testit(True, False) is True | ||
assert testit(False, True) is False | ||
assert testit(False, False) is True |