From d2aacd57ddd2e2d0a34cdeb653115532e96a6b1c Mon Sep 17 00:00:00 2001 From: GappleBee Date: Thu, 21 Nov 2024 18:50:33 +0000 Subject: [PATCH] Removed redundant bitand and bitor methods. --- django/contrib/postgres/search.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/django/contrib/postgres/search.py b/django/contrib/postgres/search.py index 1a4be55cb9..f0291c5ed3 100644 --- a/django/contrib/postgres/search.py +++ b/django/contrib/postgres/search.py @@ -415,17 +415,11 @@ class LexemeCombinable: # On Combinable, these are not implemented to reduce confusion with Q. In # this case we are actually (ab)using them to do logical combination so # it's consistent with other usage in Django. - def bitand(self, other): - return self._combine(other, self.BITAND, False) - - def bitor(self, other): + def __or__(self, other): return self._combine(other, self.BITOR, False) - def __or__(self, other): - return self.bitor(other) - def __and__(self, other): - return self.bitand(other) + return self._combine(other, self.BITAND, False) class Lexeme(LexemeCombinable, Value):