You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [1]: import OMPython
In [2]: mod = OMPython.ModelicaSystem("/usr/share/doc/omc/testmodels/BouncingBall.mo", "BouncingBall", raiseerrors=True)
In [3]: mod.getOutputs("ThisOutputDoesNotExist")
Out[3]: ['NotExist']
In [4]: mod.simulate()
In [5]: mod.getOutputs("ThisOutputDoesNotExist")
Out[5]: ('ThisOutputDoesNotExist', ' is not Output')
In my opinion, it would be best to raise an exception (maybe KeyError?) in cases like this instead of returning invalid values. However, that would be an incompatible API change.
I'm currently trying to improve the docstrings for methods in ModelicaSystem. Should I document these weird quirks?
The text was updated successfully, but these errors were encountered:
Example:
In my opinion, it would be best to raise an exception (maybe KeyError?) in cases like this instead of returning invalid values. However, that would be an incompatible API change.
I'm currently trying to improve the docstrings for methods in ModelicaSystem. Should I document these weird quirks?
The text was updated successfully, but these errors were encountered: