From 957ef6bf390d499453e1ab9f13b0d62ae6102e30 Mon Sep 17 00:00:00 2001 From: hungtu Date: Thu, 4 May 2017 14:42:35 +0200 Subject: [PATCH] #90 Fix proper use of bitwise operator --- rivescript/sorting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rivescript/sorting.py b/rivescript/sorting.py index bbdf6f4..db9338a 100644 --- a/rivescript/sorting.py +++ b/rivescript/sorting.py @@ -47,7 +47,7 @@ def __init__(self, pattern, index, weight, inherit = sys.maxsize): self.option = self.alphabet.count('[') + self.alphabet.count('(') # Number of option 0 < 1 if self.star > 0: - if self.pound == 0 & self.under == 0 & self.option == 0: # Place single star last in the rank + if (self.pound == 0) & (self.under == 0) & (self.option == 0): # Place single star last in the rank self.pound = sys.maxsize self.under = sys.maxsize self.option = sys.maxsize