mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Simple Python 3 compatibility changes
Summary: Changes that move towards python 3 compatibility that are easy to review without much thought Test Plan: The tests Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2873
This commit is contained in:
@@ -97,6 +97,8 @@ class Record(object):
|
||||
def __nonzero__(self):
|
||||
return bool(self._row_id)
|
||||
|
||||
__bool__ = __nonzero__
|
||||
|
||||
def __repr__(self):
|
||||
return "%s[%s]" % (self._table.table_id, self._row_id)
|
||||
|
||||
@@ -144,6 +146,8 @@ class RecordSet(object):
|
||||
def __nonzero__(self):
|
||||
return bool(self._row_ids)
|
||||
|
||||
__bool__ = __nonzero__
|
||||
|
||||
def __eq__(self, other):
|
||||
return (isinstance(other, RecordSet) and
|
||||
(self._table, self._row_ids, self._group_by, self._sort_by) ==
|
||||
|
||||
Reference in New Issue
Block a user