We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3c4617 commit 8b78bb5Copy full SHA for 8b78bb5
rocketpy/Function.py
@@ -944,6 +944,17 @@ def __len__(self):
944
"""
945
return len(self.source)
946
947
+ def __bool__(self):
948
+ """Returns true if self exists. This is to avoid getting into __len__
949
+ method in boolean statements.
950
+
951
+ Returns
952
+ -------
953
+ bool : bool
954
+ Always True.
955
+ """
956
+ return True
957
958
# Define all presentation methods
959
def __call__(self, *args):
960
"""Plot the Function if no argument is given. If an
0 commit comments