Skip to content

Commit cdd4e3e

Browse files
avratassteinbach
authored andcommitted
Added repr for SchemaDefs (#566)
1 parent 35edffb commit cdd4e3e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/py-opentimelineio/opentimelineio/schema/schemadef.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,26 @@ def module(self):
3434

3535
return self._module
3636

37+
def __str__(self):
38+
return "SchemaDef({}, {}, {})".format(
39+
repr(self.name),
40+
repr(self.execution_scope),
41+
repr(self.filepath)
42+
)
43+
44+
def __repr__(self):
45+
return (
46+
"otio.schema.SchemaDef("
47+
"name={}, "
48+
"execution_scope={}, "
49+
"filepath={}"
50+
")".format(
51+
repr(self.name),
52+
repr(self.execution_scope),
53+
repr(self.filepath)
54+
)
55+
)
56+
3757

3858
def available_schemadef_names():
3959
"""Return a string list of the available schemadefs."""

0 commit comments

Comments
 (0)