Skip to content

Commit

Permalink
Merge branch 'fix/table' into 'release/v0.33.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonlopaciuk committed Apr 21, 2023
2 parents 066a39c + b31ae00 commit b1b067b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xtrack/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ def values(self):
def items(self):
return self._data.items()

def __dir__(self):
return super().__dir__() + list(self._data.keys())

def __iter__(self):
return self._data.__iter__()

Expand Down Expand Up @@ -335,7 +338,7 @@ def __setattr__(self, key, val):

def __repr__(self):
n = self._nrows
c = len(self._data)
c = len(self._col_names)
ns = "s" if n != 1 else ""
cs = "s" if c != 1 else ""
out = [f"{self.__class__.__name__}: {n} row{ns}, {c} col{cs}"]
Expand Down

0 comments on commit b1b067b

Please sign in to comment.