Skip to content
Snippets Groups Projects
Commit cf1233d8 authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

better repr for EventFrame and TSFrame

Don't neglect to include the rest of the frame attributes.
parent 149e3496
No related branches found
No related tags found
1 merge request!73better repr for EventFrame and TSFrame
......@@ -127,9 +127,10 @@ class EventFrame(Frame):
return iter(self.events)
def __repr__(self):
out = ""
out = f"EventFrame(EOS={self.EOS}, is_gap={self.is_gap}, metadata={self.metadata}, events={{\n"
for evt, v in self.events.items():
out += "\n\t%s\n\t\t%s" % (evt, v)
out += f" {evt}: {v}\n"
out += "}})"
return out
......@@ -576,9 +577,10 @@ class TSFrame(Frame):
return iter(self.buffers)
def __repr__(self):
out = ""
out = f"TSFrame(EOS={self.EOS}, is_gap={self.is_gap}, metadata={self.metadata}, buffers=[\n"
for buf in self:
out += "\n\t%s" % buf
out += f" {buf}\n"
out += "])"
return out
def __len__(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment