Skip to content

Commit 66f66fe

Browse files
committed
Python UnionDefinition add __repr__ for testing
1 parent 9156f4b commit 66f66fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Runtime/Python/src/python_bebop/bebop.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ def __init__(self, discriminator: int, value: Any):
3232
self.discriminator = discriminator
3333
self.value = value
3434

35+
def __repr__(self) -> str:
36+
return f"UnionDefinition(discriminator={self.discriminator!r}, value={self.value!r})"
37+
3538
UnionType = TypeVar("UnionType", bound=UnionDefinition)
3639

3740
class BebopReader:

0 commit comments

Comments
 (0)