Improve Python KeySelector representation

Python 2 resolves escape characters when printing byte strings,
which doesn't seem useful in this context.

I replaced __str__ since it defaults to __repr__ and the change
should be suitable for both cases.
This commit is contained in:
Chris Donati 2019-03-31 11:54:36 -07:00 committed by A.J. Beamon
parent 22b0b27078
commit 2d4d219ef2
1 changed files with 2 additions and 2 deletions

View File

@ -1159,8 +1159,8 @@ class KeySelector(object):
def first_greater_or_equal(cls, key):
return cls(key, False, 1)
def __str__(self):
return 'KeySelector(%s, %r, %d)' % (self.key, self.or_equal, self.offset)
def __repr__(self):
return 'KeySelector(%r, %r, %r)' % (self.key, self.or_equal, self.offset)
class KVIter(object):