Commit c47de8be authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

update Instance.args setter

parent 2b40017b
...@@ -38,6 +38,9 @@ class Instance: ...@@ -38,6 +38,9 @@ class Instance:
Update the arguments of this instance with a new one Update the arguments of this instance with a new one
""" """
if isinstance(new_arguments, tuple): if isinstance(new_arguments, tuple):
assert (
len(new_arguments) == len(self.args)
), "Must set new Instance arguments to have same size + types as old arguments"
self.arguments = new_arguments self.arguments = new_arguments
else: else:
print("Please enter a valid arguments tuple") raise ValueError("Must set new Instance args to a tuple!")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment