Skip to content

Commit 6b5ef3f

Browse files
authored
Merge pull request aichaos#91 from Dinh-Hung-Tu/90
aichaos#90 Fix proper use of bitwise operator
2 parents 0a6a0b9 + 957ef6b commit 6b5ef3f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rivescript/sorting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(self, pattern, index, weight, inherit = sys.maxsize):
4747
self.option = self.alphabet.count('[') + self.alphabet.count('(') # Number of option 0 < 1
4848

4949
if self.star > 0:
50-
if self.pound == 0 & self.under == 0 & self.option == 0: # Place single star last in the rank
50+
if (self.pound == 0) & (self.under == 0) & (self.option == 0): # Place single star last in the rank
5151
self.pound = sys.maxsize
5252
self.under = sys.maxsize
5353
self.option = sys.maxsize

0 commit comments

Comments
 (0)