11
11
from pandas .core .dtypes .common import is_list_like
12
12
13
13
import pandas as pd
14
- from pandas .core .base import StringMixin
15
14
import pandas .core .common as com
16
15
from pandas .core .computation import expr , ops
17
16
from pandas .core .computation .common import _ensure_decoded
@@ -36,8 +35,7 @@ class Term(ops.Term):
36
35
37
36
def __new__ (cls , name , env , side = None , encoding = None ):
38
37
klass = Constant if not isinstance (name , str ) else cls
39
- supr_new = StringMixin .__new__
40
- return supr_new (klass )
38
+ return object .__new__ (klass )
41
39
42
40
def __init__ (self , name , env , side = None , encoding = None ):
43
41
super ().__init__ (name , env , side = side , encoding = encoding )
@@ -230,7 +228,7 @@ def convert_values(self):
230
228
231
229
class FilterBinOp (BinOp ):
232
230
233
- def __str__ (self ):
231
+ def __repr__ (self ):
234
232
return pprint_thing ("[Filter : [{lhs}] -> [{op}]"
235
233
.format (lhs = self .filter [0 ], op = self .filter [1 ]))
236
234
@@ -302,7 +300,7 @@ def evaluate(self):
302
300
303
301
class ConditionBinOp (BinOp ):
304
302
305
- def __str__ (self ):
303
+ def __repr__ (self ):
306
304
return pprint_thing ("[Condition : [{cond}]]"
307
305
.format (cond = self .condition ))
308
306
@@ -549,7 +547,7 @@ def __init__(self, where, queryables=None, encoding=None, scope_level=0):
549
547
encoding = encoding )
550
548
self .terms = self .parse ()
551
549
552
- def __str__ (self ):
550
+ def __repr__ (self ):
553
551
if self .terms is not None :
554
552
return pprint_thing (self .terms )
555
553
return pprint_thing (self .expr )
0 commit comments